Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Pass through `cwd` from ACP extension (#39511)

Richard Feldman21e75b82216d
diff --git a/crates/agent_servers/src/acp.rs b/crates/agent_servers/src/acp.rs
index 2b977d60df5..245d899f8af 100644
--- a/crates/agent_servers/src/acp.rs
+++ b/crates/agent_servers/src/acp.rs
@@ -713,6 +713,9 @@ impl acp::Client for ClientDelegate {
if let Some(id_str) = terminal_info.get("terminal_id").and_then(|v| v.as_str())
{
let terminal_id = acp::TerminalId(id_str.into());
+ let cwd = terminal_info
+ .get("cwd")
+ .and_then(|v| v.as_str().map(PathBuf::from));
// Create a minimal display-only lower-level terminal and register it.
let _ = session.thread.update(&mut self.cx.clone(), |thread, cx| {
@@ -727,7 +730,7 @@ impl acp::Client for ClientDelegate {
TerminalProviderEvent::Created {
terminal_id: terminal_id.clone(),
label: tc.title.clone(),
- cwd: None,
+ cwd,
output_byte_limit: None,
terminal: lower,
},