diff options
Diffstat (limited to 'packages/tui/internal/components/chat')
| -rw-r--r-- | packages/tui/internal/components/chat/editor.go | 2 | ||||
| -rw-r--r-- | packages/tui/internal/components/chat/messages.go | 31 |
2 files changed, 19 insertions, 14 deletions
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.go index f78bd1926..24cb588ed 100644 --- a/packages/tui/internal/components/chat/editor.go +++ b/packages/tui/internal/components/chat/editor.go @@ -273,7 +273,7 @@ func (m *editorComponent) View() string { Width(m.width). Background(t.BackgroundElement()). Border(lipgloss.ThickBorder(), false, true). - BorderForeground(t.BorderActive()). + BorderForeground(t.BackgroundSubtle()). BorderBackground(t.Background()). Render(textarea) diff --git a/packages/tui/internal/components/chat/messages.go b/packages/tui/internal/components/chat/messages.go index ef35a3532..81f2d2a38 100644 --- a/packages/tui/internal/components/chat/messages.go +++ b/packages/tui/internal/components/chat/messages.go @@ -245,7 +245,7 @@ func (m *messagesComponent) header() string { base := styles.BaseStyle().Render muted := styles.Muted().Render headerLines := []string{} - headerLines = append(headerLines, toMarkdown("# "+m.app.Session.Title, width, t.Background())) + headerLines = append(headerLines, toMarkdown("# "+m.app.Session.Title, width-4, t.BackgroundElement())) if m.app.Session.Share != nil && m.app.Session.Share.Url != "" { headerLines = append(headerLines, muted(m.app.Session.Share.Url)) } else { @@ -255,20 +255,25 @@ func (m *messagesComponent) header() string { header = styles.BaseStyle(). Width(width). - PaddingTop(1). - BorderBottom(true). - BorderForeground(t.BorderSubtle()). - BorderStyle(lipgloss.NormalBorder()). - Background(t.Background()). + PaddingLeft(2). + Background(t.BackgroundElement()). + BorderLeft(true). + BorderRight(true). + BorderBackground(t.Background()). + BorderForeground(t.BackgroundSubtle()). + BorderStyle(lipgloss.ThickBorder()). Render(header) - return header + return "\n" + header + "\n" } func (m *messagesComponent) View() string { - if len(m.app.Messages) == 0 || m.rendering { + if len(m.app.Messages) == 0 { return m.home() } + if m.rendering { + return m.viewport.View() + } return lipgloss.JoinVertical( lipgloss.Left, lipgloss.PlaceHorizontal(m.width, lipgloss.Center, m.header()), @@ -301,8 +306,8 @@ func (m *messagesComponent) home() string { styles.Muted().Render(open), styles.BaseStyle().Render(code), ) - cwd := app.Info.Path.Cwd - config := app.Info.Path.Config + // cwd := app.Info.Path.Cwd + // config := app.Info.Path.Config commands := [][]string{ {"/help", "show help"}, @@ -329,9 +334,9 @@ func (m *messagesComponent) home() string { lines = append(lines, "") lines = append(lines, logoAndVersion) lines = append(lines, "") - lines = append(lines, base("cwd ")+muted(cwd)) - lines = append(lines, base("config ")+muted(config)) - lines = append(lines, "") + // lines = append(lines, base("cwd ")+muted(cwd)) + // lines = append(lines, base("config ")+muted(config)) + // lines = append(lines, "") lines = append(lines, commandLines...) lines = append(lines, "") if m.rendering { |
