fix: assistant message footer styles

This commit is contained in:
adamdotdevin
2025-08-11 10:57:18 -05:00
parent 9c8e56fc96
commit a4113acd15

View File

@@ -375,7 +375,7 @@ func renderText(
info = author + timestamp info = author + timestamp
} }
if !showToolDetails && toolCalls != nil && len(toolCalls) > 0 { if !showToolDetails && toolCalls != nil && len(toolCalls) > 0 {
content = content + "\n\n" content = content + "\n"
for _, toolCall := range toolCalls { for _, toolCall := range toolCalls {
title := renderToolTitle(toolCall, width-2) title := renderToolTitle(toolCall, width-2)
style := styles.NewStyle() style := styles.NewStyle()
@@ -383,16 +383,16 @@ func renderText(
style = style.Foreground(t.Error()) style = style.Foreground(t.Error())
} }
title = style.Render(title) title = style.Render(title)
title = "∟ " + title + "\n" title = "\n∟ " + title
content = content + title content = content + title
} }
} }
sections := []string{content} sections := []string{content}
if extra != "" { if extra != "" {
sections = append(sections, "\n"+extra+"\n") sections = append(sections, "\n"+extra)
} }
sections = append(sections, info) sections = append(sections, "\n"+info)
content = strings.Join(sections, "\n") content = strings.Join(sections, "\n")
switch message.(type) { switch message.(type) {