fix(tui): collapse multiline tool summaries so action rows don't stripe

file_read on a directory/file returns newline-bearing summaries; clip kept the
newlines, so the action row rendered multi-line with a background-filled stripe
and the listing leaking underneath. Flatten the summary to one line first.
This commit is contained in:
2026-06-28 20:42:38 +04:00
parent 3e94d7fbff
commit 8abe7d9eb7
+4 -1
View File
@@ -451,7 +451,10 @@ func countSuffix(added, removed int) string {
// actionToolText joins a tool label with a short, clipped result summary. // actionToolText joins a tool label with a short, clipped result summary.
func actionToolText(label, summary string) string { func actionToolText(label, summary string) string {
s := strings.TrimSpace(summary) // Collapse to a single line first: tool summaries (dir listings, file heads)
// often carry newlines, and a multi-line action row paints a background stripe
// per line with the raw content leaking underneath.
s := strings.Join(strings.Fields(summary), " ")
if s == "" { if s == "" {
return label return label
} }