Fix some breakages against agent-client-protocol/main
This commit is contained in:
parent
76f0f9163d
commit
8890f590b1
1 changed files with 24 additions and 14 deletions
|
@ -2844,10 +2844,6 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AgentConnection for StubAgentConnection {
|
impl AgentConnection for StubAgentConnection {
|
||||||
fn name(&self) -> &'static str {
|
|
||||||
"StubAgentConnection"
|
|
||||||
}
|
|
||||||
|
|
||||||
fn new_thread(
|
fn new_thread(
|
||||||
self: Rc<Self>,
|
self: Rc<Self>,
|
||||||
project: Entity<Project>,
|
project: Entity<Project>,
|
||||||
|
@ -2863,17 +2859,27 @@ mod tests {
|
||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
let thread = cx
|
let thread = cx
|
||||||
.new(|cx| AcpThread::new(self.clone(), project, session_id.clone(), cx))
|
.new(|cx| {
|
||||||
|
AcpThread::new("New Thread", self.clone(), project, session_id.clone(), cx)
|
||||||
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
self.sessions.lock().insert(session_id, thread.downgrade());
|
self.sessions.lock().insert(session_id, thread.downgrade());
|
||||||
Task::ready(Ok(thread))
|
Task::ready(Ok(thread))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn authenticate(&self, _cx: &mut App) -> Task<gpui::Result<()>> {
|
fn auth_methods(&self) -> &[agent_client_protocol::AuthMethod] {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn authenticate(
|
||||||
|
&self,
|
||||||
|
_method: acp::AuthMethodId,
|
||||||
|
_cx: &mut App,
|
||||||
|
) -> Task<gpui::Result<()>> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prompt(&self, params: acp::PromptArguments, cx: &mut App) -> Task<gpui::Result<()>> {
|
fn prompt(&self, params: acp::PromptRequest, cx: &mut App) -> Task<gpui::Result<()>> {
|
||||||
let sessions = self.sessions.lock();
|
let sessions = self.sessions.lock();
|
||||||
let thread = sessions.get(¶ms.session_id).unwrap();
|
let thread = sessions.get(¶ms.session_id).unwrap();
|
||||||
let mut tasks = vec![];
|
let mut tasks = vec![];
|
||||||
|
@ -2920,10 +2926,6 @@ mod tests {
|
||||||
struct SaboteurAgentConnection;
|
struct SaboteurAgentConnection;
|
||||||
|
|
||||||
impl AgentConnection for SaboteurAgentConnection {
|
impl AgentConnection for SaboteurAgentConnection {
|
||||||
fn name(&self) -> &'static str {
|
|
||||||
"SaboteurAgentConnection"
|
|
||||||
}
|
|
||||||
|
|
||||||
fn new_thread(
|
fn new_thread(
|
||||||
self: Rc<Self>,
|
self: Rc<Self>,
|
||||||
project: Entity<Project>,
|
project: Entity<Project>,
|
||||||
|
@ -2931,15 +2933,23 @@ mod tests {
|
||||||
cx: &mut gpui::AsyncApp,
|
cx: &mut gpui::AsyncApp,
|
||||||
) -> Task<gpui::Result<Entity<AcpThread>>> {
|
) -> Task<gpui::Result<Entity<AcpThread>>> {
|
||||||
Task::ready(Ok(cx
|
Task::ready(Ok(cx
|
||||||
.new(|cx| AcpThread::new(self, project, SessionId("test".into()), cx))
|
.new(|cx| AcpThread::new("New Thread", self, project, SessionId("test".into()), cx))
|
||||||
.unwrap()))
|
.unwrap()))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn authenticate(&self, _cx: &mut App) -> Task<gpui::Result<()>> {
|
fn auth_methods(&self) -> &[agent_client_protocol::AuthMethod] {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn authenticate(
|
||||||
|
&self,
|
||||||
|
_method: acp::AuthMethodId,
|
||||||
|
_cx: &mut App,
|
||||||
|
) -> Task<gpui::Result<()>> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prompt(&self, _params: acp::PromptArguments, _cx: &mut App) -> Task<gpui::Result<()>> {
|
fn prompt(&self, _params: acp::PromptRequest, _cx: &mut App) -> Task<gpui::Result<()>> {
|
||||||
Task::ready(Err(anyhow::anyhow!("Error prompting")))
|
Task::ready(Err(anyhow::anyhow!("Error prompting")))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue