diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs index 6d039c8e68..9182aa0c8a 100644 --- a/crates/agent/src/active_thread.rs +++ b/crates/agent/src/active_thread.rs @@ -600,14 +600,8 @@ fn render_markdown_code_block( .bg(cx.theme().colors().editor_background) .child(codeblock_header) .when( - metadata.line_count > MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK, - |this| { - if is_expanded { - this.h_full() - } else { - this.max_h_80() - } - }, + metadata.line_count > MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK && !is_expanded, + |this| this.max_h_80(), ) }