Fixed build failures related to PR 14717 (#14826)

This commit is contained in:
Eric Traut 2026-03-16 12:41:25 -06:00 committed by GitHub
parent 7a6e30b55b
commit a0e41f4ff9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 29 additions and 0 deletions

View file

@ -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()

View file

@ -0,0 +1,7 @@
---
source: tui_app_server/src/multi_agents.rs
assertion_line: 784
expression: cell_to_text(&cell)
---
• Resumed Robie [explorer]
└ Interrupted