diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs index 56a28f6896243ff3632bd96943a8545be0c2d8e6..463e44e19edab0eedab265e9b476aa1ddbc5e6f1 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(), ) }