fix(tui): preserve newlines in user messages by bypassing glamour
This commit is contained in:
@@ -220,6 +220,14 @@ func (m model) renderMessage(msg sidekick.Message) string {
|
||||
content := msg.Content
|
||||
reasoning := msg.Reasoning
|
||||
|
||||
// Handle user message specifically to preserve newlines
|
||||
if msg.Role == sidekick.MessageRoleUser {
|
||||
if m.width > 4 {
|
||||
content = lipgloss.NewStyle().Width(m.width - 4).Render(content)
|
||||
}
|
||||
return label + "\n" + content
|
||||
}
|
||||
|
||||
// If this is the banner message, handle it specially to preserve ASCII art
|
||||
if strings.Contains(content, "----") && msg.Role == sidekick.MessageRoleSystem {
|
||||
if strings.HasPrefix(content, banner) {
|
||||
|
||||
Reference in New Issue
Block a user