mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-28 13:14:28 +01:00
feat: compact command with auto-compact
This commit is contained in:
@@ -23,6 +23,8 @@ type SessionClearedMsg struct{}
|
||||
|
||||
type EditorFocusMsg bool
|
||||
|
||||
type CompactSessionMsg struct{}
|
||||
|
||||
func header(width int) string {
|
||||
return lipgloss.JoinVertical(
|
||||
lipgloss.Top,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user