MCPcopy Create free account
hub / github.com/evilsocket/cake / run_remote

Function run_remote

cake-cli/src/chat.rs:880–894  ·  view source on GitHub ↗

Remote chat: connect to an API server.

(server: &str)

Source from the content-addressed store, hash-verified

878
879/// Remote chat: connect to an API server.
880pub async fn run_remote(server: &str) -> Result<()> {
881 enable_raw_mode()?;
882 let mut stdout = io::stdout();
883 execute!(stdout, EnterAlternateScreen)?;
884 let backend = ratatui::backend::CrosstermBackend::new(stdout);
885 let mut terminal = Terminal::new(backend)?;
886
887 let result = run_app(&mut terminal, server).await;
888
889 disable_raw_mode()?;
890 execute!(terminal.backend_mut(), LeaveAlternateScreen)?;
891 terminal.show_cursor()?;
892
893 result
894}
895
896async fn run_app(
897 terminal: &mut Terminal<ratatui::backend::CrosstermBackend<io::Stdout>>,

Callers 2

mainFunction · 0.85
run_localFunction · 0.85

Calls 1

run_appFunction · 0.85

Tested by

no test coverage detected