Merge branch 'main' into mcp-acp-gemini

This commit is contained in:
Ben Brandt 2025-07-30 12:24:01 +02:00
commit f028ca4d1a
No known key found for this signature in database
GPG key ID: D4618C5D3B500571
115 changed files with 3523 additions and 1437 deletions

View file

@ -1594,6 +1594,8 @@ mod tests {
name: "test",
connection,
child_status: io_task,
current_thread: thread_rc,
agent_state: Default::default(),
};
AcpThread::new(

View file

@ -13,6 +13,7 @@ use std::{
rc::Rc,
};
use ui::App;
use util::ResultExt as _;
use crate::{AcpThread, AgentConnection};
@ -52,7 +53,7 @@ impl acp_old::Client for OldAcpClientDelegate {
thread.push_assistant_content_block(thought.into(), true, cx)
}
})
.ok();
.log_err();
})?;
Ok(())
@ -371,6 +372,7 @@ pub struct OldAcpAgentConnection {
pub connection: acp_old::AgentConnection,
pub child_status: Task<Result<()>>,
pub agent_state: Rc<RefCell<acp::AgentState>>,
pub current_thread: Rc<RefCell<WeakEntity<AcpThread>>>,
}
impl AgentConnection for OldAcpAgentConnection {
@ -386,6 +388,7 @@ impl AgentConnection for OldAcpAgentConnection {
}
.into_any(),
);
let current_thread = self.current_thread.clone();
cx.spawn(async move |cx| {
let result = task.await?;
let result = acp_old::InitializeParams::response_from_any(result)?;
@ -399,6 +402,7 @@ impl AgentConnection for OldAcpAgentConnection {
let session_id = acp::SessionId("acp-old-no-id".into());
AcpThread::new("Gemini", self.clone(), project, session_id, cx)
});
current_thread.replace(thread.downgrade());
thread
})
})