Lightweight coding agent that runs in your terminal
Rust
Collapse waited message (#12430)
pakrym-oaia87c9c3299a4
diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_empty_then_non_empty_after.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_empty_then_non_empty_after.snapindex 400845c82f..dcfad97ba0 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_empty_then_non_empty_after.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_empty_then_non_empty_after.snap@@ -2,8 +2,7 @@source: tui/src/chatwidget/tests.rsexpression: combined----↳ Interacted with background terminal · just fix- └ (waited)+• Waited for background terminal · just fix↳ Interacted with background terminal · just fix└ lsdiff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_non_empty_then_empty_after.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_non_empty_then_empty_after.snapindex f6f0188f95..952205e732 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_non_empty_then_empty_after.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_non_empty_then_empty_after.snap@@ -5,5 +5,4 @@ expression: combined↳ Interacted with background terminal · just fix└ pwd-↳ Interacted with background terminal · just fix- └ (waited)+• Waited for background terminal · just fixdiff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_wait_after_final_agent_message.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_wait_after_final_agent_message.snapindex 5caf42e1bc..fdbdffc5dd 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_wait_after_final_agent_message.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_wait_after_final_agent_message.snap@@ -2,7 +2,6 @@source: tui/src/chatwidget/tests.rsexpression: combined----↳ Interacted with background terminal · cargo test -p codex-core- └ (waited)+• Waited for background terminal · cargo test -p codex-core• Final response.diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_wait_before_streamed_agent_message.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_wait_before_streamed_agent_message.snapindex cfea4f8a66..f91637e2db 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_wait_before_streamed_agent_message.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_wait_before_streamed_agent_message.snap@@ -2,7 +2,6 @@source: tui/src/chatwidget/tests.rsexpression: combined----↳ Interacted with background terminal · cargo test -p codex-core- └ (waited)+• Waited for background terminal · cargo test -p codex-core• Streaming response.diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_waiting_multiple_empty_after.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_waiting_multiple_empty_after.snapindex 782ecb1eab..99bf8e2bdc 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_waiting_multiple_empty_after.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__unified_exec_waiting_multiple_empty_after.snap@@ -2,5 +2,4 @@source: tui/src/chatwidget/tests.rsexpression: combined----↳ Interacted with background terminal · just fix- └ (waited)+• Waited for background terminal · just fixdiff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rsindex 8789196946..8c4d0147df 100644--- a/codex-rs/tui/src/history_cell.rs+++ b/codex-rs/tui/src/history_cell.rs@@ -589,8 +589,13 @@ impl HistoryCell for UnifiedExecInteractionCell {return Vec::new();}let wrap_width = width as usize;+ let waited_only = self.stdin.is_empty();- let mut header_spans = vec!["↳ ".dim(), "Interacted with background terminal".bold()];+ let mut header_spans = if waited_only {+ vec!["• Waited for background terminal".bold()]+ } else {+ vec!["↳ ".dim(), "Interacted with background terminal".bold()]+ };if let Some(command) = &self.command_display&& !command.is_empty(){@@ -603,14 +608,15 @@ impl HistoryCell for UnifiedExecInteractionCell {let header_wrapped = word_wrap_line(&header, RtOptions::new(wrap_width));push_owned_lines(&header_wrapped, &mut out);- let input_lines: Vec<Line<'static>> = if self.stdin.is_empty() {- vec![vec!["(waited)".dim()].into()]- } else {- self.stdin- .lines()- .map(|line| Line::from(line.to_string()))- .collect()- };+ if waited_only {+ return out;+ }++ let input_lines: Vec<Line<'static>> = self+ .stdin+ .lines()+ .map(|line| Line::from(line.to_string()))+ .collect();let input_wrapped = word_wrap_lines(input_lines,@@ -2465,10 +2471,7 @@ mod tests {fn unified_exec_interaction_cell_renders_wait() {let cell = new_unified_exec_interaction(None, String::new());let lines = render_transcript(&cell);- assert_eq!(- lines,- vec!["↳ Interacted with background terminal", " └ (waited)"],- );+ assert_eq!(lines, vec!["• Waited for background terminal"]);}#[test]