mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
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:
@@ -188,8 +188,8 @@ func (m *messageCmp) renderAssistantMessage() string {
|
|||||||
truncated := ansi.Truncate(finishedData.Message, m.textWidth()-2-lipgloss.Width(errTag), "...")
|
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))
|
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)
|
details := t.S().Base.Foreground(t.FgSubtle).Width(m.textWidth() - 2).Render(finishedData.Details)
|
||||||
// Handle error messages differently
|
errorContent := fmt.Sprintf("%s\n\n%s", title, details)
|
||||||
return fmt.Sprintf("%s\n\n%s", title, details)
|
return m.style().Render(errorContent)
|
||||||
}
|
}
|
||||||
|
|
||||||
if thinkingContent != "" {
|
if thinkingContent != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user