fix(tui): apply border styling to error messages in selected state

Error messages were not showing the left border indicator when selected/focused,
making them inconsistent with other message types in the chat interface.

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>
This commit is contained in:
Kujtim Hoxha
2025-07-30 12:51:54 +02:00
parent ebf3b43b4a
commit 6235248b93

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 != "" {