Merge branch 'main' into mcp-acp-gemini
This commit is contained in:
commit
f028ca4d1a
115 changed files with 3523 additions and 1437 deletions
|
@ -1594,6 +1594,8 @@ mod tests {
|
|||
name: "test",
|
||||
connection,
|
||||
child_status: io_task,
|
||||
current_thread: thread_rc,
|
||||
agent_state: Default::default(),
|
||||
};
|
||||
|
||||
AcpThread::new(
|
||||
|
|
|
@ -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
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue