Skip to main content

run_client

Function run_client 

Source
pub async fn run_client<T, E>(
    term: T,
    events: E,
    cwd: PathBuf,
    from_daemon: UnboundedReceiver<DaemonMessage>,
    to_daemon: UnboundedSender<ClientMessage>,
    initial_message: Option<String>,
    session: Option<String>,
    startup_info: Option<String>,
) -> Result<(), Box<dyn Error + Send + Sync>>
where T: TermOut + 'static, E: EventSource + 'static,
Expand description

Core client logic — works with channels regardless of transport, and any terminal implementation. Production wrappers pass the crossterm-backed terminal and the process cwd; tests substitute a virtual terminal, scripted events, and a temp cwd.