Files
codex/codex-rs/tui/src/exec_cell/mod.rs
Charlie Marsh ef6b597f41 Keep streamed command output bounded in the TUI (#34359)
## Why

Large command streams, including commands that never emit a newline, can make an active TUI cell grow without bound.

## What changed

- Retain live output in full up to 1 MiB, then preserve the first and last 50 completed lines plus the current partial line.
- Bound individual long lines while preserving UTF-8 boundaries, visible head and tail content, and ANSI rendering around omission markers.
- Show omitted line and byte counts in previews and transcripts. Final command output still replaces the bounded live preview when execution completes.

## Testing

Added unit and snapshot coverage for chunk boundaries, split CRLF sequences, newline-free and UTF-8 output, truncated ANSI sequences, retained-output limits, and preview and transcript rendering.

GitOrigin-RevId: 3cf3cc862db686f20ac09b1f6e7f9dc6d264e6eb
2026-07-20 14:44:25 +00:00

13 lines
326 B
Rust

mod live_output;
mod model;
mod render;
pub(crate) use model::CommandOutput;
#[cfg(test)]
pub(crate) use model::ExecCall;
pub(crate) use model::ExecCell;
pub(crate) use render::OutputLinesParams;
pub(crate) use render::TOOL_CALL_MAX_LINES;
pub(crate) use render::new_active_exec_command;
pub(crate) use render::output_lines;