Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Fixed build failures related to PR 14717 (#14826)

Eric Trauta0e41f4ff9b4
diff --git a/codex-rs/tui_app_server/src/multi_agents.rs b/codex-rs/tui_app_server/src/multi_agents.rs
index 00a1c0429c..672e20e1a2 100644
--- a/codex-rs/tui_app_server/src/multi_agents.rs
+++ b/codex-rs/tui_app_server/src/multi_agents.rs
@@ -541,6 +541,9 @@ fn status_summary_spans(status: &AgentStatus) -> Vec<Span<'static>> {
match status {
AgentStatus::PendingInit => vec![Span::from("Pending init").cyan()],
AgentStatus::Running => vec![Span::from("Running").cyan().bold()],
+ // Allow `.yellow()`
+ #[allow(clippy::disallowed_methods)]
+ AgentStatus::Interrupted => vec![Span::from("Interrupted").yellow()],
AgentStatus::Completed(message) => {
let mut spans = vec![Span::from("Completed").green()];
if let Some(message) = message.as_ref() {
@@ -762,6 +765,25 @@ mod tests {
assert_eq!(title.spans[6].style.fg, Some(Color::Magenta));
}
+ #[test]
+ fn collab_resume_interrupted_snapshot() {
+ let sender_thread_id = ThreadId::from_string("00000000-0000-0000-0000-000000000001")
+ .expect("valid sender thread id");
+ let robie_id = ThreadId::from_string("00000000-0000-0000-0000-000000000002")
+ .expect("valid robie thread id");
+
+ let cell = resume_end(CollabResumeEndEvent {
+ call_id: "call-resume".to_string(),
+ sender_thread_id,
+ receiver_thread_id: robie_id,
+ receiver_agent_nickname: Some("Robie".to_string()),
+ receiver_agent_role: Some("explorer".to_string()),
+ status: AgentStatus::Interrupted,
+ });
+
+ assert_snapshot!("collab_resume_interrupted", cell_to_text(&cell));
+ }
+
fn cell_to_text(cell: &PlainHistoryCell) -> String {
cell.display_lines(200)
.iter()
diff --git a/codex-rs/tui_app_server/src/snapshots/codex_tui_app_server__multi_agents__tests__collab_resume_interrupted.snap b/codex-rs/tui_app_server/src/snapshots/codex_tui_app_server__multi_agents__tests__collab_resume_interrupted.snap
new file mode 100644
index 0000000000..cf72d0a637
--- /dev/null
+++ b/codex-rs/tui_app_server/src/snapshots/codex_tui_app_server__multi_agents__tests__collab_resume_interrupted.snap
@@ -0,0 +1,7 @@
+---
+source: tui_app_server/src/multi_agents.rs
+assertion_line: 784
+expression: cell_to_text(&cell)
+---
+• Resumed Robie [explorer]
+ └ Interrupted