From 1422b6731d2747cf3ca5273a9b5d7d29f94cf4be Mon Sep 17 00:00:00 2001 From: "zed-zippy[bot]" <234243425+zed-zippy[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 19:32:36 +0000 Subject: [PATCH] Fix ACP extension root dir (#42131) (cherry-pick to stable) (#42132) Cherry-pick of #42131 to stable ---- Agents running in extensions need to have a root directory of the extension's dir for installation and authentication, but *not* for the conversation itself - otherwise the agent is running things like terminal commands in the wrong dir. Release Notes: - Fixed Agent Server extensions having the current working directory of the extension rather than the project Co-authored-by: Richard Feldman --- crates/agent_ui/src/acp/thread_view.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rs index 3284c94e7ca07e9d0e1875222b4f47ac6578426d..73c6198c9222ddfb19e2d7b6020efc049c3fe8bc 100644 --- a/crates/agent_ui/src/acp/thread_view.rs +++ b/crates/agent_ui/src/acp/thread_view.rs @@ -539,14 +539,7 @@ impl AcpThreadView { }) .log_err() } else { - let root_dir = if let Some(acp_agent) = connection - .clone() - .downcast::() - { - acp_agent.root_dir().into() - } else { - root_dir.unwrap_or(paths::home_dir().as_path().into()) - }; + let root_dir = root_dir.unwrap_or(paths::home_dir().as_path().into()); cx.update(|_, cx| { connection .clone()