History

acp_thread: Render execute tool titles as plain text (#55783)

We had a regression where the labels were being rendered as markdown, which is usually not what you want on a command Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A

Ben Brandt committed 6 months ago

Commit 00a677e1 parent f5bd1591 file · +7 −2Browse files

Unified · Split

crates/acp_thread/src/acp_thread.rs+7−2
@@ -299,10 +299,15 @@ impl ToolCall { · 298 unmodified lines
299299
300300 let subagent_session_info = subagent_session_info_from_meta(&tool_call.meta);
301301
302+ let label = if tool_call.kind == acp::ToolKind::Execute {
303+ cx.new(|cx| Markdown::new_text(title.into(), cx))
304+ } else {
305+ cx.new(|cx| Markdown::new(title.into(), Some(language_registry.clone()), None, cx))
306+ };
307+
302308 let result = Self {
303309 id: tool_call.tool_call_id,
304− label: cx
305− .new(|cx| Markdown::new(title.into(), Some(language_registry.clone()), None, cx)),
310+ label,
306311 kind: tool_call.kind,
307312 content,
308313 locations: tool_call.locations,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t