From 00eb57820fc11e9d87652bb6ba0d6c46845e5171 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Wed, 13 Mar 2024 05:09:42 +0000 Subject: [PATCH] tui: styling tweak --- pkg/tui/tui.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/tui/tui.go b/pkg/tui/tui.go index 29e7074..2710969 100644 --- a/pkg/tui/tui.go +++ b/pkg/tui/tui.go @@ -70,9 +70,9 @@ type ( // styles var ( - contentStyle = lipgloss.NewStyle().PaddingLeft(2) - userStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("10")) - assistantStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("12")) + userStyle = lipgloss.NewStyle().PaddingLeft(1).Bold(true).Foreground(lipgloss.Color("10")) + assistantStyle = lipgloss.NewStyle().PaddingLeft(1).Bold(true).Foreground(lipgloss.Color("12")) + messageStyle = lipgloss.NewStyle().PaddingLeft(2) headerStyle = lipgloss.NewStyle(). PaddingLeft(1). Background(lipgloss.Color("0")) @@ -340,7 +340,7 @@ func (m *model) updateContent() { sb.WriteString(fmt.Sprintf("%s:\n\n", style.Render(string(message.Role.FriendlyRole())))) highlighted, _ := m.ctx.Chroma.HighlightS(message.Content) - sb.WriteString(contentStyle.Width(m.content.Width - 5).Render(highlighted)) + sb.WriteString(messageStyle.Width(m.content.Width - 5).Render(highlighted)) if i < msgCnt-1 { sb.WriteString("\n\n") }