mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:50:52 +00:00
Render dynamic tool activity and preserve TUI history ordering (#46731)
## Why The TUI ignored dynamic tool items, and replayed tool activity could differ from live output. Concurrent tool completion also needs to preserve transcript order when writing to terminal scrollback. ## What changed - Retain dynamic tool rows, update them when calls finish out of order, and mark unfinished calls interrupted when a turn ends. - Queue terminal output behind unfinished dynamic tools and drain settled rows in bounded batches. Preserve queued output through stream consolidation, resize, and rollback without emitting it twice. - Align replayed file changes, MCP results, and exploration groups with live rendering. Keep hidden reasoning and terminal interaction details within compatible activity groups, and preserve finalized plan fragments. - Ignore stale history-page responses, bound turn metadata requests to missing turns, and insert older history after session headers. Keep hidden review prompts as activity-group boundaries. ## Testing Add regression tests and snapshots for out-of-order tool completion, interruption, ordered scrollback emission, rollback, deferred usage updates, replay consistency, overlapping history, and repeated hidden prompts. GitOrigin-RevId: a3636cfcf4c9c43a0a5bc52a842b80a7834f1409
This commit is contained in:
@@ -34,6 +34,9 @@ pub(super) struct StatusCopySource {
|
||||
#[derive(Default)]
|
||||
pub(super) struct TranscriptState {
|
||||
pub(super) active_cell: Option<Box<dyn HistoryCell>>,
|
||||
/// Shared retained rows for concurrently running dynamic tools, removed on completion.
|
||||
pub(super) dynamic_calls:
|
||||
std::collections::HashMap<String, crate::history_cell::DynamicToolCallCell>,
|
||||
/// Monotonic-ish counter used to invalidate transcript overlay caching.
|
||||
pub(super) active_cell_revision: u64,
|
||||
/// One bounded entry shared by layout and paint across unchanged active-cell frames.
|
||||
|
||||
Reference in New Issue
Block a user