Files
codex/codex-rs/tui/src/chatwidget/completion.rs
T
Eric Traut a7a9d82f15 Collapse completed turn activity beneath transcript prompts (#60557)
## What changed

- Fold earlier commentary, reasoning, and tool activity beneath an expandable prompt control in the full-screen transcript, keeping partial and final answers visible.
- Label the control with completion timing when available, or a previous-message count otherwise. Keep tool groups independently expandable within the turn.
- Preserve assistant message phases during live completion and replay, and retain untimed completion markers to identify completed turns.

## Testing

Add transcript coverage for nested expansion, keyboard and mouse controls, narrow viewports, search anchor preservation, detailed mode, and legacy messages without phase or timing metadata.

GitOrigin-RevId: b17d9d7c870990178d76d12a13d463ff9c32b96c
2026-11-10 08:36:09 +00:00

22 lines
788 B
Rust

//! Completion metadata for live and restored turns. Saved timestamps are authoritative;
//! only a live completion may fall back to the local clock. Labels are deduplicated per thread.
use super::*;
impl ChatWidget {
pub(crate) fn completion_cell(
&mut self,
turn: &Turn,
replay_kind: Option<ReplayKind>,
) -> Option<history_cell::FinalMessageSeparator> {
let live = replay_kind.is_none();
history_cell::FinalMessageSeparator::from_turn_once(
turn,
&mut self.turn_lifecycle.rendered_completion_turn_ids,
self.bottom_pane.status_elapsed().filter(|_| live),
live.then(Local::now),
)
.filter(|cell| self.local_settings.transcript_mode.is_owned() || cell.has_timing())
}
}