From d21184b1d3f8f3303e22b765dca1ce4cf2aa6048 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Thu, 6 Nov 2025 14:19:16 -0500 Subject: [PATCH] Fix ACP extension root dir (#42131) 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 --- 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 717565c8486b79e3223a98fcf5e8ba8379fd0ae9..e6aab8c52adf112b07891178a3e0d98c8962b742 100644 --- a/crates/agent_ui/src/acp/thread_view.rs +++ b/crates/agent_ui/src/acp/thread_view.rs @@ -538,14 +538,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()