From e5ba0c32bcc83d8a74e1ac57f2ee35003e621510 Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Mon, 2 Jun 2025 10:31:01 +0200 Subject: [PATCH] fix(ui): small ui fixes --- internal/tui/components/chat/editor/editor.go | 6 +++--- internal/tui/components/core/helpers.go | 2 +- .../tui/components/dialogs/sessions/sessions.go | 2 +- internal/tui/styles/crush.go | 2 +- internal/tui/styles/theme.go | 4 +++- todos.md | 15 +++++++++++---- 6 files changed, 20 insertions(+), 11 deletions(-) diff --git a/internal/tui/components/chat/editor/editor.go b/internal/tui/components/chat/editor/editor.go index b18ec71d8f7812e60931e02605bc3ed7784a76f7..f26ad9fb24b575909f8ce9d5ac165928ca0e93e9 100644 --- a/internal/tui/components/chat/editor/editor.go +++ b/internal/tui/components/chat/editor/editor.go @@ -358,11 +358,11 @@ func CreateTextArea(existing *textarea.Model) textarea.Model { t := styles.CurrentTheme() ta := textarea.New() ta.SetStyles(t.S().TextArea) - ta.SetPromptFunc(2, func(lineIndex int) string { + ta.SetPromptFunc(4, func(lineIndex int) string { if lineIndex == 0 { - return "> " + return " > " } - return t.S().Muted.Render(": ") + return t.S().Base.Foreground(t.Blue).Render("::: ") }) ta.ShowLineNumbers = false ta.CharLimit = -1 diff --git a/internal/tui/components/core/helpers.go b/internal/tui/components/core/helpers.go index 60c9709bf0ae0560e40b5e1994e89ab2f055d22e..994433e3169d808c6e717385caf6dc57d4a383e2 100644 --- a/internal/tui/components/core/helpers.go +++ b/internal/tui/components/core/helpers.go @@ -26,7 +26,7 @@ func Title(title string, width int) string { length := len(title) + 1 remainingWidth := width - length lineStyle := t.S().Base.Foreground(t.Primary) - titleStyle := t.S().Base.Foreground(t.Secondary) + titleStyle := t.S().Base.Foreground(t.Primary) if remainingWidth > 0 { title = titleStyle.Render(title) + " " + lineStyle.Render(strings.Repeat(char, remainingWidth)) } diff --git a/internal/tui/components/dialogs/sessions/sessions.go b/internal/tui/components/dialogs/sessions/sessions.go index 0339877dd44b3577ca3e7073e1353ebcb41a6612..b0921ce47dbb3e3a3e6afafcca7b794b8f07bc05 100644 --- a/internal/tui/components/dialogs/sessions/sessions.go +++ b/internal/tui/components/dialogs/sessions/sessions.go @@ -124,7 +124,7 @@ func (s *sessionDialogCmp) View() tea.View { t.S().Base.Padding(0, 1, 1, 1).Render(core.Title("Switch Session", s.width-4)), listView.String(), "", - t.S().Base.Width(s.width-2).PaddingRight(2).AlignHorizontal(lipgloss.Right).Render(s.help.View(s.keyMap)), + t.S().Base.Width(s.width-2).PaddingLeft(1).AlignHorizontal(lipgloss.Left).Render(s.help.View(s.keyMap)), ) v := tea.NewView(s.style().Render(content)) diff --git a/internal/tui/styles/crush.go b/internal/tui/styles/crush.go index 5f2fbd94b7547068bf324024612039e30e8af29e..e25c06aafebcc7ee61262931c9fe54875c847b0d 100644 --- a/internal/tui/styles/crush.go +++ b/internal/tui/styles/crush.go @@ -15,7 +15,7 @@ func NewCrushTheme() *Theme { Tertiary: lipgloss.Color(charmtone.Bok.Hex()), Accent: lipgloss.Color(charmtone.Zest.Hex()), - PrimaryLight: lipgloss.Color(charmtone.Hazy.Hex()), + Blue: lipgloss.Color(charmtone.Malibu.Hex()), // Backgrounds BgBase: lipgloss.Color(charmtone.Pepper.Hex()), diff --git a/internal/tui/styles/theme.go b/internal/tui/styles/theme.go index 7533b7351773f21868341b66c0adf85104a54ff6..fe9173027f38b899e0b70f084d0ae01d1c0e98c3 100644 --- a/internal/tui/styles/theme.go +++ b/internal/tui/styles/theme.go @@ -27,7 +27,9 @@ type Theme struct { Tertiary color.Color Accent color.Color - PrimaryLight color.Color + // Colors + Blue color.Color + // TODO: add any others needed BgBase color.Color BgSubtle color.Color diff --git a/todos.md b/todos.md index fd87bfff909fd8d05aa4fc3012656a435eb4c717..635dc0703583fa8ec87883d7b34da04241c1c3ef 100644 --- a/todos.md +++ b/todos.md @@ -2,7 +2,14 @@ ## Landing page -- [ ] Implement the logo landing page -- [ ] Add cwd improved -- [ ] Implement Active LSPs -- [ ] Implement Active MCPs +- [x] Implement the logo landing page +- [x] Add cwd improved +- [x] Implement Active LSPs +- [x] Implement Active MCPs + +## Dialogs + +- [ ] Move sessions and modal dialog to the commands +- [x] Sessions dialog +- [ ] Commands +- [ ] Models