Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent: Don't render Markdown for file names in tool calls (#49668)
Kavi Bidlack6cbb3b96357e
diff --git a/crates/acp_thread/src/acp_thread.rs b/crates/acp_thread/src/acp_thread.rsindex 1a5764eca1b..d4e0e16ee1d 100644--- a/crates/acp_thread/src/acp_thread.rs+++ b/crates/acp_thread/src/acp_thread.rs@@ -31,6 +31,7 @@ use task::{Shell, ShellBuilder};pub use terminal::*;use text::Bias;use ui::App;+use util::markdown::MarkdownEscaped;use util::path_list::PathList;use util::{ResultExt, get_default_system_shell_preferring_bash, paths::PathStyle};use uuid::Uuid;@@ -246,6 +247,8 @@ impl ToolCall {) -> Result<Self> {let title = if tool_call.kind == acp::ToolKind::Execute {tool_call.title+ } else if tool_call.kind == acp::ToolKind::Edit {+ MarkdownEscaped(tool_call.title.as_str()).to_string()} else if let Some((first_line, _)) = tool_call.title.split_once("\n") {first_line.to_owned() + "…"} else {@@ -334,6 +337,8 @@ impl ToolCall {self.label.update(cx, |label, cx| {if self.kind == acp::ToolKind::Execute {label.replace(title, cx);+ } else if self.kind == acp::ToolKind::Edit {+ label.replace(MarkdownEscaped(&title).to_string(), cx)} else if let Some((first_line, _)) = title.split_once("\n") {label.replace(first_line.to_owned() + "…", cx);} else {