INNER CODE UNIT · Rust

run_actor

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

async fn run_actor(
    process: impl ConnectTo<Client>,
    mut commands: mpsc::UnboundedReceiver<Command>,
    events: mpsc::UnboundedSender<AcpSessionEvent>,
    ready: oneshot::Sender<Result<AcpAgentInfo, AcpError>>,
) -> Result<(), agent_client_protocol::Error> {
    let pending: PendingPermissions = Arc::new(Mutex::new(HashMap::new()));
    Client
        .builder()
        .name("wisp-acp")
        .on_receive_notification(
            {
                let events = events.clone();
                async move |message: UntypedMessage, cx| {
                    if !SessionNotification::matches_method(&message.method) {
                        return Ok(Handled::No {
                            message: (message, cx),
                            retry: false,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…