fix(tui/history): avoid spacer after collapsed reasoning before exec

This commit is contained in:
James Peter
2026-01-08 10:29:39 +10:00
parent 219984c4cc
commit fcb48a710a
+13
View File
@@ -37783,6 +37783,19 @@ impl WidgetRef for &ChatWidget<'_> {
.downcast_ref::<crate::history_cell::CollapsibleReasoningCell>()
.map(|rc| rc.is_collapsed())
.unwrap_or(false);
if this_collapsed {
if let Some(j) = next_visible_idx {
if let Some(next_cell) = cells[j].cell {
if matches!(
next_cell.kind(),
history_cell::HistoryCellType::Exec { .. }
) {
should_add_spacing = false;
}
}
}
}
if this_collapsed {
let prev_collapsed = prev_visible_idx
.and_then(|j| cells[j]