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:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user