agent: Fix 10 line code blocks being expandable despite fitting (#30540)
Release Notes: - N/A
This commit is contained in:
parent
8d79226445
commit
4deb8cce8d
1 changed files with 2 additions and 2 deletions
|
@ -487,7 +487,7 @@ fn render_markdown_code_block(
|
||||||
.copied_code_block_ids
|
.copied_code_block_ids
|
||||||
.contains(&(message_id, ix));
|
.contains(&(message_id, ix));
|
||||||
|
|
||||||
let can_expand = metadata.line_count > MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK;
|
let can_expand = metadata.line_count >= MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK;
|
||||||
|
|
||||||
let is_expanded = if can_expand {
|
let is_expanded = if can_expand {
|
||||||
active_thread.read(cx).is_codeblock_expanded(message_id, ix)
|
active_thread.read(cx).is_codeblock_expanded(message_id, ix)
|
||||||
|
@ -2347,7 +2347,7 @@ impl ActiveThread {
|
||||||
|
|
||||||
move |el, range, metadata, _, cx| {
|
move |el, range, metadata, _, cx| {
|
||||||
let can_expand = metadata.line_count
|
let can_expand = metadata.line_count
|
||||||
> MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK;
|
>= MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK;
|
||||||
if !can_expand {
|
if !can_expand {
|
||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue