From 49423da081d6fdffb0bd7275e070a2edeb28e3b5 Mon Sep 17 00:00:00 2001 From: adamdottv <2363879+adamdottv@users.noreply.github.com> Date: Fri, 2 May 2025 09:24:24 -0500 Subject: feat: compact command with auto-compact --- internal/tui/components/chat/chat.go | 2 ++ internal/tui/components/chat/list.go | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'internal/tui/components') diff --git a/internal/tui/components/chat/chat.go b/internal/tui/components/chat/chat.go index d6eaecec9..52c9a4f71 100644 --- a/internal/tui/components/chat/chat.go +++ b/internal/tui/components/chat/chat.go @@ -23,6 +23,8 @@ type SessionClearedMsg struct{} type EditorFocusMsg bool +type CompactSessionMsg struct{} + func header(width int) string { return lipgloss.JoinVertical( lipgloss.Top, diff --git a/internal/tui/components/chat/list.go b/internal/tui/components/chat/list.go index 1dfc3ab20..2bddb19da 100644 --- a/internal/tui/components/chat/list.go +++ b/internal/tui/components/chat/list.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "math" + "time" "github.com/charmbracelet/bubbles/key" "github.com/charmbracelet/bubbles/spinner" @@ -450,8 +451,11 @@ func (m *messagesCmp) BindingKeys() []key.Binding { } func NewMessagesCmp(app *app.App) tea.Model { - s := spinner.New() - s.Spinner = spinner.Pulse + customSpinner := spinner.Spinner{ + Frames: []string{" ", "┃"}, + FPS: time.Second / 2, //nolint:gomnd + } + s := spinner.New(spinner.WithSpinner(customSpinner)) vp := viewport.New(0, 0) vp.KeyMap.PageUp = messageKeys.PageUp vp.KeyMap.PageDown = messageKeys.PageDown -- cgit v1.2.3