tui: styling tweak

This commit is contained in:
Matt Low 2024-03-13 05:09:42 +00:00
parent 5afc9667c7
commit 793aaab50e
1 changed files with 4 additions and 4 deletions

View File

@ -70,9 +70,9 @@ type (
// styles // styles
var ( var (
contentStyle = lipgloss.NewStyle().PaddingLeft(2) userStyle = lipgloss.NewStyle().PaddingLeft(1).Bold(true).Foreground(lipgloss.Color("10"))
userStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("10")) assistantStyle = lipgloss.NewStyle().PaddingLeft(1).Bold(true).Foreground(lipgloss.Color("12"))
assistantStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("12")) messageStyle = lipgloss.NewStyle().PaddingLeft(2)
headerStyle = lipgloss.NewStyle(). headerStyle = lipgloss.NewStyle().
PaddingLeft(1). PaddingLeft(1).
Background(lipgloss.Color("0")) 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())))) sb.WriteString(fmt.Sprintf("%s:\n\n", style.Render(string(message.Role.FriendlyRole()))))
highlighted, _ := m.ctx.Chroma.HighlightS(message.Content) 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 { if i < msgCnt-1 {
sb.WriteString("\n\n") sb.WriteString("\n\n")
} }