INNER CODE UNIT · Rust

next_event

xuzhougeng/wisp-science · crates/wisp-acp/src/lib.rs:295

    pub async fn next_event(&self) -> Option<AcpSessionEvent> {
        self.event_rx.lock().await.recv().await
    }

    pub async fn authenticate(&self, method_id: impl Into<String>) -> Result<(), AcpError> {
        self.request(|reply| Command::Authenticate(method_id.into(), reply))
            .await
    }

    pub async fn new_session(
        &self,
        cwd: impl AsRef<Path>,
        mcp_servers: Vec<McpServer>,
    ) -> Result<AcpSessionStart, AcpError> {
        self.request(|reply| Command::NewSession(cwd.as_ref().to_path_buf(), mcp_servers, reply))
            .await
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…