Merge pull request #355 from charmbracelet/fix_error_select

fix(tui): apply border styling to error messages in selected state
This commit is contained in:
Kujtim Hoxha
2025-07-30 16:05:08 +02:00
committed by GitHub

View File

@@ -188,8 +188,8 @@ func (m *messageCmp) renderAssistantMessage() string {
truncated := ansi.Truncate(finishedData.Message, m.textWidth()-2-lipgloss.Width(errTag), "...")
title := fmt.Sprintf("%s %s", errTag, t.S().Base.Foreground(t.FgHalfMuted).Render(truncated))
details := t.S().Base.Foreground(t.FgSubtle).Width(m.textWidth() - 2).Render(finishedData.Details)
// Handle error messages differently
return fmt.Sprintf("%s\n\n%s", title, details)
errorContent := fmt.Sprintf("%s\n\n%s", title, details)
return m.style().Render(errorContent)
}
if thinkingContent != "" {