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.

agent_ui: Allow expanding running MCP tool calls (#60695)

Bennet Bo Fenner3c45bfb2059a
diff --git a/crates/agent_ui/src/conversation_view/thread_view.rs b/crates/agent_ui/src/conversation_view/thread_view.rs
index 08646698120..8e302db68d0 100644
--- a/crates/agent_ui/src/conversation_view/thread_view.rs
+++ b/crates/agent_ui/src/conversation_view/thread_view.rs
@@ -8116,7 +8116,13 @@ impl ThreadView {
let use_card_layout = needs_confirmation || is_edit || is_terminal_tool;
let has_image_content = tool_call.content.iter().any(|c| c.image().is_some());
- let is_collapsible = !tool_call.content.is_empty() && !needs_confirmation;
+
+ let should_show_raw_input = !is_terminal_tool && !is_edit && !has_image_content;
+
+ let has_content = !tool_call.content.is_empty()
+ || (should_show_raw_input && tool_call.raw_input.is_some());
+
+ let is_collapsible = has_content && !needs_confirmation;
let mut is_open = self
.entry_view_state
.read(cx)
@@ -8124,8 +8130,6 @@ impl ThreadView {
is_open |= needs_confirmation;
- let should_show_raw_input = !is_terminal_tool && !is_edit && !has_image_content;
-
let input_output_header = |label: SharedString| {
Label::new(label)
.size(LabelSize::XSmall)