Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent2: Fix agent location still being present after thread stopped (#36471)
Bennet Bo Fenner97a31c59c997
diff --git a/crates/acp_thread/src/acp_thread.rs b/crates/acp_thread/src/acp_thread.rsindex 916f48cbe04..b86696d437a 100644--- a/crates/acp_thread/src/acp_thread.rs+++ b/crates/acp_thread/src/acp_thread.rs@@ -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();diff --git a/crates/agent_ui/src/agent_diff.rs b/crates/agent_ui/src/agent_diff.rsindex b0b06583a47..b010f8a424f 100644--- a/crates/agent_ui/src/agent_diff.rs+++ b/crates/agent_ui/src/agent_diff.rs@@ -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(_) => {}}}