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.

Stop spawning ACP/MCP servers with interactive shells (#44826)

Xipeng Jin3db2d03bb3cf
diff --git a/crates/agent_servers/src/acp.rs b/crates/agent_servers/src/acp.rs
index 41aff48a209..e99855fe8a7 100644
--- a/crates/agent_servers/src/acp.rs
+++ b/crates/agent_servers/src/acp.rs
@@ -89,7 +89,7 @@ impl AcpConnection {
cx: &mut AsyncApp,
) -> Result<Self> {
let shell = cx.update(|cx| TerminalSettings::get(None, cx).shell.clone())?;
- let builder = ShellBuilder::new(&shell, cfg!(windows));
+ let builder = ShellBuilder::new(&shell, cfg!(windows)).non_interactive();
let mut child =
builder.build_command(Some(command.path.display().to_string()), &command.args);
child
diff --git a/crates/context_server/src/transport/stdio_transport.rs b/crates/context_server/src/transport/stdio_transport.rs
index 031f348294c..e675770e9ee 100644
--- a/crates/context_server/src/transport/stdio_transport.rs
+++ b/crates/context_server/src/transport/stdio_transport.rs
@@ -32,7 +32,7 @@ impl StdioTransport {
cx: &AsyncApp,
) -> Result<Self> {
let shell = cx.update(|cx| TerminalSettings::get(None, cx).shell.clone())?;
- let builder = ShellBuilder::new(&shell, cfg!(windows));
+ let builder = ShellBuilder::new(&shell, cfg!(windows)).non_interactive();
let mut command =
builder.build_command(Some(binary.executable.display().to_string()), &binary.args);