agent2: Fix agent location still being present after thread stopped (#36471)

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner authored and GitHub committed 2025-08-19 10:22:17 +00:00
1 parent b2f8a577ca
commit a4cd0ee84d
2 files changed
+6 -4

No files matched your search

+2
View File
@@ -1282,6 +1282,8 @@ impl AcpThread {
.await?;
this.update(cx, |this, cx| {
this.project
.update(cx, |project, cx| project.set_agent_location(None, cx));
match response {
Ok(Err(e)) => {
this.send_task.take();
+4 -4
View File
@@ -1520,12 +1520,12 @@ impl AgentDiff {
self.update_reviewing_editors(workspace, window, cx);
}
}
AcpThreadEvent::Stopped | AcpThreadEvent::Error | AcpThreadEvent::ServerExited(_) => {
self.update_reviewing_editors(workspace, window, cx);
}
AcpThreadEvent::EntriesRemoved(_)
| AcpThreadEvent::Stopped
| AcpThreadEvent::ToolAuthorizationRequired
| AcpThreadEvent::Retry(_)
| AcpThreadEvent::Error
| AcpThreadEvent::ServerExited(_) => {}
| AcpThreadEvent::Retry(_) => {}
}
}