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

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner 2025-08-19 12:22:17 +02:00 committed by Orual
parent c59d2dcc6d
commit 6ebd617d40
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View file

@ -1282,6 +1282,8 @@ impl AcpThread {
.await?; .await?;
this.update(cx, |this, cx| { this.update(cx, |this, cx| {
this.project
.update(cx, |project, cx| project.set_agent_location(None, cx));
match response { match response {
Ok(Err(e)) => { Ok(Err(e)) => {
this.send_task.take(); this.send_task.take();

View file

@ -1520,12 +1520,12 @@ impl AgentDiff {
self.update_reviewing_editors(workspace, window, cx); self.update_reviewing_editors(workspace, window, cx);
} }
} }
AcpThreadEvent::Stopped | AcpThreadEvent::Error | AcpThreadEvent::ServerExited(_) => {
self.update_reviewing_editors(workspace, window, cx);
}
AcpThreadEvent::EntriesRemoved(_) AcpThreadEvent::EntriesRemoved(_)
| AcpThreadEvent::Stopped
| AcpThreadEvent::ToolAuthorizationRequired | AcpThreadEvent::ToolAuthorizationRequired
| AcpThreadEvent::Retry(_) | AcpThreadEvent::Retry(_) => {}
| AcpThreadEvent::Error
| AcpThreadEvent::ServerExited(_) => {}
} }
} }