mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Compact successful command activity in the TUI (#38921)
## What changed - Group consecutive successful agent and unified-exec startup commands into a compact `Ran N commands` entry while preserving their full transcript. - Flush command groups at interaction boundaries, after failures, and after 32 completed commands. Keep manual shell commands and failed or declined commands visible. - Apply the same grouping rules when replaying thread history without duplicating command starts or disturbing unrelated active commands. ## Testing - Add TUI coverage for live and replayed grouping, transcript preservation, failures, overlapping commands, group limits, and interaction boundaries. GitOrigin-RevId: d6602a20201644012fcff3d6cecf4690024383a9
This commit is contained in:
1 parent
935b1c4e3d
commit
1f41cc5d92
18 files changed
+696
-76
No files matched your search
@@ -147,6 +147,32 @@ impl ChatWidget {
|
||||
status: codex_app_server_protocol::CommandExecutionStatus::InProgress,
|
||||
..
|
||||
} => self.on_command_execution_started(item),
|
||||
item @ ThreadItem::CommandExecution {
|
||||
source: ExecCommandSource::Agent | ExecCommandSource::UnifiedExecStartup,
|
||||
status:
|
||||
codex_app_server_protocol::CommandExecutionStatus::Completed
|
||||
| codex_app_server_protocol::CommandExecutionStatus::Failed,
|
||||
..
|
||||
} if from_replay => {
|
||||
if matches!(
|
||||
&item,
|
||||
ThreadItem::CommandExecution {
|
||||
status: codex_app_server_protocol::CommandExecutionStatus::Failed,
|
||||
..
|
||||
}
|
||||
) {
|
||||
self.flush_completed_command_activity();
|
||||
}
|
||||
if !self.transcript.active_cell.as_ref().is_some_and(|cell| {
|
||||
cell.as_any()
|
||||
.downcast_ref::<ExecCell>()
|
||||
.is_some_and(ExecCell::is_active)
|
||||
|| cell.as_any().is::<McpToolCallCell>()
|
||||
}) {
|
||||
self.handle_command_execution_started_now(item.clone());
|
||||
}
|
||||
self.handle_command_execution_completed_now(item);
|
||||
}
|
||||
item @ ThreadItem::CommandExecution { .. } => self.on_command_execution_completed(item),
|
||||
ThreadItem::FileChange {
|
||||
status: codex_app_server_protocol::PatchApplyStatus::InProgress,
|
||||
|
||||
Reference in new issue
Block a user