From 5fd4a5ea2e04ebbb7521bd3803095cda2198f5c8 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Wed, 4 Mar 2026 10:25:43 -0500 Subject: [PATCH] Collapse whitespace in ProgressUI tool call display to prevent line breaks Multi-line arguments (e.g. spawn_agent task descriptions) were breaking the single-line progress output. Co-Authored-By: Claude Opus 4.6 --- crates/arc-workflows/src/cli/progress.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/arc-workflows/src/cli/progress.rs b/crates/arc-workflows/src/cli/progress.rs index ebaa83cd6..254aa718e 100644 --- a/crates/arc-workflows/src/cli/progress.rs +++ b/crates/arc-workflows/src/cli/progress.rs @@ -92,12 +92,13 @@ fn format_number(n: f64) -> String { // ── Tool call display name ────────────────────────────────────────────── fn truncate(s: &str, max: usize) -> String { - if s.len() > max { - let mut t: String = s.chars().take(max - 3).collect(); + let single_line: String = s.split_whitespace().collect::>().join(" "); + if single_line.len() > max { + let mut t: String = single_line.chars().take(max - 3).collect(); t.push_str("..."); t } else { - s.to_string() + single_line } }