From 47ad1b2143414482eeff20bab8b3b70d3c103875 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Tue, 2 Sep 2025 09:03:11 -0400 Subject: [PATCH] agent2: Fix terminal tool call content not being shown once truncated (#37318) We render terminals as inline if their content is below a certain line count, and scrollable past that point. In the scrollable case we weren't setting a height for the terminal's container, causing it to be rendered at height 0, which means no lines would be displayed. This PR fixes that by setting an explicit height for the scrollable case, like we do in the agent1 UI code. Release Notes: - agent: Fixed a bug that caused terminals in the panel to be empty after their content reached a certain size. --- crates/agent_ui/src/acp/thread_view.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rs index c039826c83affe53d8354bf2c744bbe40b1015b8..c3bf7219b4919c7e479f22f327b73d90b0b1dad7 100644 --- a/crates/agent_ui/src/acp/thread_view.rs +++ b/crates/agent_ui/src/acp/thread_view.rs @@ -2655,7 +2655,18 @@ impl AcpThreadView { .bg(cx.theme().colors().editor_background) .rounded_b_md() .text_ui_sm(cx) - .children(terminal_view.clone()), + .h_full() + .children(terminal_view.map(|terminal_view| { + if terminal_view + .read(cx) + .content_mode(window, cx) + .is_scrollable() + { + div().h_72().child(terminal_view).into_any_element() + } else { + terminal_view.into_any_element() + } + })), ) }) .into_any()