Skip to content

Commit cb38079

Browse files
halfaipgclaude
andcommitted
fix: indent all lines of tool block boxes, not just the top border
The " " + block concatenation only prepended spaces to the first line of the multi-line lipgloss box, causing the top ╭───╮ to be offset from the sides │ and bottom ╰───╯. Now splits on newlines and indents every line consistently. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dc243db commit cb38079

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

chat.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,14 @@ func (m *chatModel) rebuildViewport() {
365365
if seg.tool.state == "pending" {
366366
block = strings.Replace(block, "⣾", m.spinner.View(), 1)
367367
}
368-
sb.WriteString(" " + block + "\n\n")
368+
// Indent every line of the block (not just the first)
369+
for i, line := range strings.Split(block, "\n") {
370+
if i > 0 {
371+
sb.WriteString("\n")
372+
}
373+
sb.WriteString(" " + line)
374+
}
375+
sb.WriteString("\n\n")
369376
default:
370377
sb.WriteString(seg.text)
371378
}

0 commit comments

Comments
 (0)