Documentation
¶
Index ¶
- Variables
- func AgentColor(agent string) color.Color
- func CopyToClipboard(text string) error
- func FileStatusIcon(status string) (icon string, desc string)
- func HexColor(c color.Color) string
- func KeyToBytes(msg tea.KeyPressMsg) []byte
- func RenderHelpBar(s Styles, items []struct{ ... }, width int) string
- func RenderHelpBarItems(styles Styles, items []HelpBinding) string
- func RenderHelpItem(styles Styles, key, desc string) string
- func ScrollDeltaForHeight(height, factor int) int
- func SetCurrentTheme(id ThemeID)
- func SpinnerFrame(frame int) string
- func WrapHelpItems(items []string, width int) []string
- type AgentOption
- type Dialog
- func (d *Dialog) Cursor() *tea.Cursor
- func (d *Dialog) Hide()
- func (d *Dialog) SetInputTransform(fn InputTransformFunc) *Dialog
- func (d *Dialog) SetInputValidate(fn InputValidateFunc) *Dialog
- func (d *Dialog) SetShowKeymapHints(show bool)
- func (d *Dialog) SetSize(width, height int)
- func (d *Dialog) Show()
- func (d *Dialog) Update(msg tea.Msg) (*Dialog, tea.Cmd)
- func (d *Dialog) View() string
- func (d *Dialog) Visible() bool
- type DialogResult
- type DialogType
- type FilePicker
- func (fp *FilePicker) Cursor() *tea.Cursor
- func (fp *FilePicker) Hide()
- func (fp *FilePicker) SetPrimaryActionLabel(label string)
- func (fp *FilePicker) SetShowKeymapHints(show bool)
- func (fp *FilePicker) SetSize(width, height int)
- func (fp *FilePicker) SetStyles(styles Styles)
- func (fp *FilePicker) SetTitle(title string)
- func (fp *FilePicker) Show()
- func (fp *FilePicker) Update(msg tea.Msg) (*FilePicker, tea.Cmd)
- func (fp *FilePicker) View() string
- func (fp *FilePicker) Visible() bool
- type HelpBinding
- type HelpOverlay
- func (h *HelpOverlay) ContainsClick(x, y int) bool
- func (h *HelpOverlay) Hide()
- func (h *HelpOverlay) SetSize(width, height int)
- func (h *HelpOverlay) SetStyles(styles Styles)
- func (h *HelpOverlay) Show()
- func (h *HelpOverlay) Toggle()
- func (h *HelpOverlay) Update(msg tea.Msg) (*HelpOverlay, HelpResult, tea.Cmd)
- func (h *HelpOverlay) View() string
- func (h *HelpOverlay) Visible() bool
- type HelpResult
- type HelpSection
- type HitRegion
- type InputTransformFunc
- type InputValidateFunc
- type SettingsDialog
- func (s *SettingsDialog) Cursor() *tea.Cursor
- func (s *SettingsDialog) Hide()
- func (s *SettingsDialog) SetShowKeymapHints(show bool)
- func (s *SettingsDialog) SetSize(w, h int)
- func (s *SettingsDialog) SetUpdateInfo(current, latest string, available bool)
- func (s *SettingsDialog) Show()
- func (s *SettingsDialog) Update(msg tea.Msg) (*SettingsDialog, tea.Cmd)
- func (s *SettingsDialog) View() string
- func (s *SettingsDialog) Visible() bool
- type SettingsResult
- type Styles
- type Theme
- func AvailableThemes() []Theme
- func AyuDarkTheme() Theme
- func CatppuccinLatteTheme() Theme
- func CatppuccinTheme() Theme
- func DraculaTheme() Theme
- func EverforestTheme() Theme
- func GetCurrentTheme() Theme
- func GetTheme(id ThemeID) Theme
- func GitHubDarkTheme() Theme
- func GitHubLightTheme() Theme
- func GruvboxLightTheme() Theme
- func GruvboxTheme() Theme
- func KanagawaTheme() Theme
- func MonokaiTheme() Theme
- func NordTheme() Theme
- func OneDarkTheme() Theme
- func OneLightTheme() Theme
- func RosePineDawnTheme() Theme
- func RosePineTheme() Theme
- func SolarizedLightTheme() Theme
- func SolarizedTheme() Theme
- func TokyoNightTheme() Theme
- type ThemeColors
- type ThemeID
- type ThemePreview
- type Toast
- type ToastDismissed
- type ToastModel
- func (m *ToastModel) Dismiss()
- func (m *ToastModel) SetStyles(styles Styles)
- func (m *ToastModel) Show(message string, toastType ToastType, duration time.Duration) tea.Cmd
- func (m *ToastModel) ShowError(message string) tea.Cmd
- func (m *ToastModel) ShowInfo(message string) tea.Cmd
- func (m *ToastModel) ShowSuccess(message string) tea.Cmd
- func (m *ToastModel) ShowWarning(message string) tea.Cmd
- func (m *ToastModel) Update(msg tea.Msg) (*ToastModel, tea.Cmd)
- func (m *ToastModel) View() string
- func (m *ToastModel) Visible() bool
- type ToastType
Constants ¶
This section is empty.
Variables ¶
var ( // Base palette ColorBackground = currentTheme.Colors.Background ColorForeground = currentTheme.Colors.Foreground ColorMuted = currentTheme.Colors.Muted ColorBorder = currentTheme.Colors.Border ColorBorderFocused = currentTheme.Colors.BorderFocused // Semantic colors ColorPrimary = currentTheme.Colors.Primary ColorSecondary = currentTheme.Colors.Secondary ColorSuccess = currentTheme.Colors.Success ColorWarning = currentTheme.Colors.Warning ColorError = currentTheme.Colors.Error ColorInfo = currentTheme.Colors.Info // Surface colors for layering ColorSurface0 = currentTheme.Colors.Surface0 ColorSurface1 = currentTheme.Colors.Surface1 ColorSurface2 = currentTheme.Colors.Surface2 ColorSurface3 = currentTheme.Colors.Surface3 // Selection/highlight ColorSelection = currentTheme.Colors.Selection ColorHighlight = currentTheme.Colors.Highlight )
Theme-dependent colors (updated by SetCurrentTheme)
var ( ColorClaude = lipgloss.Color("#CC785C") ColorCodex = lipgloss.Color("#FFFFFF") ColorGemini = lipgloss.Color("#4285f4") ColorAmp = lipgloss.Color("#ED4C3D") ColorOpencode = lipgloss.Color("#000000") ColorDroid = lipgloss.Color("#EE6018") ColorCursor = lipgloss.Color("#1B1812") )
Agent colors remain constant across themes for brand recognition.
var Icons = struct { // Status indicators Clean string Dirty string Running string Idle string Pending string // Actions Add string Delete string Edit string Close string // Navigation Cursor string CursorEmpty string ArrowRight string ArrowDown string // Objects Project string Worktree string Agent string Terminal string Folder string File string Git string Home string DirOpen string DirClosed string // Tab states TabActive string TabInactive string // Spinner frames for loading animation Spinner []string }{ Clean: "✓", Dirty: "●", Running: "●", Idle: "○", Pending: "◌", Add: "+", Delete: "×", Edit: "~", Close: "×", Cursor: ">", CursorEmpty: " ", ArrowRight: "→", ArrowDown: "↓", Project: "□", Worktree: "├", Agent: "◇", Terminal: "$", Folder: "/", File: "·", Git: "*", Home: "~", DirOpen: "▼", DirClosed: "▶", TabActive: "●", TabInactive: "○", Spinner: []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}, }
Icons used throughout the application Uses Unicode characters with fallbacks for broad terminal support
Functions ¶
func AgentColor ¶
AgentColor returns the color for a given agent type
func CopyToClipboard ¶
CopyToClipboard writes text to the system clipboard with a macOS pbcopy fallback.
func FileStatusIcon ¶
FileStatusIcon returns an icon and description for git file status
func KeyToBytes ¶
func KeyToBytes(msg tea.KeyPressMsg) []byte
KeyToBytes converts a key press message to bytes for the terminal.
func RenderHelpBar ¶
RenderHelpBar renders a help bar with the given key-description pairs
func RenderHelpBarItems ¶
func RenderHelpBarItems(styles Styles, items []HelpBinding) string
RenderHelpBarItems renders multiple help items for an inline help bar
func RenderHelpItem ¶
RenderHelpItem renders a single help item for inline help bars
func ScrollDeltaForHeight ¶ added in v0.0.3
ScrollDeltaForHeight calculates proportional scroll delta. Returns max(1, height/factor) to ensure minimum 1 line scroll.
func SetCurrentTheme ¶
func SetCurrentTheme(id ThemeID)
SetCurrentTheme applies a new theme and updates all color variables.
func SpinnerFrame ¶
SpinnerFrame returns the spinner character for a given frame index
func WrapHelpItems ¶
WrapHelpItems wraps pre-rendered help items into multiple lines constrained by width.
Types ¶
type AgentOption ¶
AgentOption represents an agent option
func DefaultAgentOptions ¶
func DefaultAgentOptions() []AgentOption
DefaultAgentOptions returns the default agent options
type Dialog ¶
type Dialog struct {
// contains filtered or unexported fields
}
Dialog is a modal dialog component
func NewAgentPicker ¶
func NewAgentPicker() *Dialog
NewAgentPicker creates a new agent selection dialog with fuzzy filtering
func NewConfirmDialog ¶
NewConfirmDialog creates a new confirmation dialog
func NewInputDialog ¶
NewInputDialog creates a new input dialog
func NewSelectDialog ¶
NewSelectDialog creates a new selection dialog
func (*Dialog) SetInputTransform ¶
func (d *Dialog) SetInputTransform(fn InputTransformFunc) *Dialog
SetInputTransform sets a transform function that will be applied to input text
func (*Dialog) SetInputValidate ¶
func (d *Dialog) SetInputValidate(fn InputValidateFunc) *Dialog
SetInputValidate sets a validation function that runs on each keystroke
func (*Dialog) SetShowKeymapHints ¶
SetShowKeymapHints controls whether helper text is rendered.
type DialogResult ¶
DialogResult is sent when a dialog is completed
type DialogType ¶
type DialogType int
DialogType identifies the type of dialog
const ( DialogNone DialogType = iota DialogInput DialogConfirm DialogSelect )
type FilePicker ¶
type FilePicker struct {
// contains filtered or unexported fields
}
FilePicker is a file/directory picker dialog
func NewFilePicker ¶
func NewFilePicker(id, startPath string, directoriesOnly bool) *FilePicker
NewFilePicker creates a new file picker starting at the given path
func (*FilePicker) Cursor ¶
func (fp *FilePicker) Cursor() *tea.Cursor
Cursor returns the cursor position relative to the file picker view.
func (*FilePicker) SetPrimaryActionLabel ¶ added in v0.0.2
func (fp *FilePicker) SetPrimaryActionLabel(label string)
SetPrimaryActionLabel updates the primary action label.
func (*FilePicker) SetShowKeymapHints ¶
func (fp *FilePicker) SetShowKeymapHints(show bool)
SetShowKeymapHints controls whether helper text is rendered.
func (*FilePicker) SetSize ¶
func (fp *FilePicker) SetSize(width, height int)
SetSize sets the picker size
func (*FilePicker) SetStyles ¶
func (fp *FilePicker) SetStyles(styles Styles)
SetStyles updates the file picker styles (for theme changes).
func (*FilePicker) SetTitle ¶ added in v0.0.2
func (fp *FilePicker) SetTitle(title string)
SetTitle updates the dialog title.
func (*FilePicker) Update ¶
func (fp *FilePicker) Update(msg tea.Msg) (*FilePicker, tea.Cmd)
Update handles messages
func (*FilePicker) Visible ¶
func (fp *FilePicker) Visible() bool
Visible returns whether the picker is visible
type HelpBinding ¶
HelpBinding represents a single keybinding
type HelpOverlay ¶
type HelpOverlay struct {
// contains filtered or unexported fields
}
HelpOverlay manages the help overlay display
func (*HelpOverlay) ContainsClick ¶ added in v0.0.3
func (h *HelpOverlay) ContainsClick(x, y int) bool
ContainsClick returns true if the click coordinates are inside the dialog. The x, y coordinates should be absolute screen coordinates.
func (*HelpOverlay) Hide ¶
func (h *HelpOverlay) Hide()
Hide hides the help overlay and resets state
func (*HelpOverlay) SetSize ¶
func (h *HelpOverlay) SetSize(width, height int)
SetSize sets the overlay size
func (*HelpOverlay) SetStyles ¶
func (h *HelpOverlay) SetStyles(styles Styles)
SetStyles updates the help overlay styles (for theme changes).
func (*HelpOverlay) Show ¶
func (h *HelpOverlay) Show()
Show shows the help overlay and resets navigation state
func (*HelpOverlay) Toggle ¶
func (h *HelpOverlay) Toggle()
Toggle toggles the help overlay visibility
func (*HelpOverlay) Update ¶ added in v0.0.3
func (h *HelpOverlay) Update(msg tea.Msg) (*HelpOverlay, HelpResult, tea.Cmd)
Update handles keyboard and mouse input for the help overlay. Returns the result and an optional command.
func (*HelpOverlay) Visible ¶
func (h *HelpOverlay) Visible() bool
Visible returns whether the help overlay is visible
type HelpResult ¶ added in v0.0.3
type HelpResult int
HelpResult indicates what happened after Update
const ( HelpResultNone HelpResult = iota // No action needed HelpResultClosed // Help was closed )
type HelpSection ¶
type HelpSection struct {
Title string
Bindings []HelpBinding
}
HelpSection represents a group of keybindings
type InputTransformFunc ¶
InputTransformFunc transforms input text before it's added to the input field
type InputValidateFunc ¶
InputValidateFunc validates input and returns an error message (empty = valid)
type SettingsDialog ¶
type SettingsDialog struct {
// contains filtered or unexported fields
}
SettingsDialog is a modal dialog for application settings.
func NewSettingsDialog ¶
func NewSettingsDialog(currentTheme ThemeID, showKeymapHints bool) *SettingsDialog
NewSettingsDialog creates a new settings dialog with current values.
func (*SettingsDialog) Cursor ¶
func (s *SettingsDialog) Cursor() *tea.Cursor
func (*SettingsDialog) Hide ¶
func (s *SettingsDialog) Hide()
func (*SettingsDialog) SetShowKeymapHints ¶
func (s *SettingsDialog) SetShowKeymapHints(show bool)
func (*SettingsDialog) SetSize ¶
func (s *SettingsDialog) SetSize(w, h int)
func (*SettingsDialog) SetUpdateInfo ¶ added in v0.0.3
func (s *SettingsDialog) SetUpdateInfo(current, latest string, available bool)
SetUpdateInfo sets version information for the updates section.
func (*SettingsDialog) Show ¶
func (s *SettingsDialog) Show()
func (*SettingsDialog) Update ¶
func (s *SettingsDialog) Update(msg tea.Msg) (*SettingsDialog, tea.Cmd)
Update handles input.
func (*SettingsDialog) View ¶
func (s *SettingsDialog) View() string
func (*SettingsDialog) Visible ¶
func (s *SettingsDialog) Visible() bool
type SettingsResult ¶
SettingsResult is sent when the settings dialog is closed.
type Styles ¶
type Styles struct {
// Layout - Pane borders and structure
Pane lipgloss.Style
FocusedPane lipgloss.Style
// Text hierarchy
Title lipgloss.Style // App name, section headers
Subtitle lipgloss.Style // Secondary headers
Body lipgloss.Style // Normal text
Muted lipgloss.Style // De-emphasized text
Bold lipgloss.Style // Emphasized text
// Dashboard - Project tree
ProjectHeader lipgloss.Style
WorktreeRow lipgloss.Style
ActiveWorktree lipgloss.Style
SelectedRow lipgloss.Style
CreateButton lipgloss.Style
HomeRow lipgloss.Style
AddProjectRow lipgloss.Style
// Status badges
StatusClean lipgloss.Style
StatusDirty lipgloss.Style
StatusPending lipgloss.Style
StatusRunning lipgloss.Style
// Git status file indicators
StatusModified lipgloss.Style
StatusAdded lipgloss.Style
StatusDeleted lipgloss.Style
StatusRenamed lipgloss.Style
StatusUntracked lipgloss.Style
// Center pane - Tabs
Tab lipgloss.Style
ActiveTab lipgloss.Style
TabBar lipgloss.Style
TabPlus lipgloss.Style
// Center pane - Agent indicators
AgentClaude lipgloss.Style
AgentCodex lipgloss.Style
AgentGemini lipgloss.Style
AgentAmp lipgloss.Style
AgentOpencode lipgloss.Style
AgentDroid lipgloss.Style
AgentCursor lipgloss.Style
AgentTerm lipgloss.Style
// Sidebar
SidebarHeader lipgloss.Style
SidebarRow lipgloss.Style
BranchName lipgloss.Style
FilePath lipgloss.Style
DirName lipgloss.Style
// Help bar
Help lipgloss.Style
HelpKey lipgloss.Style
HelpDesc lipgloss.Style
HelpSeparator lipgloss.Style
// Dialogs
DialogBox lipgloss.Style
DialogTitle lipgloss.Style
DialogMessage lipgloss.Style
DialogOption lipgloss.Style
DialogActive lipgloss.Style
// Feedback
Error lipgloss.Style
Success lipgloss.Style
Warning lipgloss.Style
Info lipgloss.Style
// Toast notifications
ToastSuccess lipgloss.Style
ToastError lipgloss.Style
ToastWarning lipgloss.Style
ToastInfo lipgloss.Style
}
Styles contains all the application styles
func DefaultStyles ¶
func DefaultStyles() Styles
DefaultStyles returns the default application styles using the current theme
type Theme ¶
type Theme struct {
ID ThemeID
Name string
Colors ThemeColors
}
Theme represents a complete color theme.
func AvailableThemes ¶
func AvailableThemes() []Theme
AvailableThemes returns all predefined themes, grouped by family.
func CatppuccinLatteTheme ¶
func CatppuccinLatteTheme() Theme
CatppuccinLatteTheme - light pastel variant
func CatppuccinTheme ¶
func CatppuccinTheme() Theme
CatppuccinTheme - pastel with mauve/lavender accent (distinct from Tokyo Night)
func GetCurrentTheme ¶
func GetCurrentTheme() Theme
GetCurrentTheme returns the currently active theme.
func GruvboxLightTheme ¶
func GruvboxLightTheme() Theme
GruvboxLightTheme - warm retro light variant
func GruvboxTheme ¶
func GruvboxTheme() Theme
GruvboxTheme - warm, retro, earthy tones with orange accent
func KanagawaTheme ¶
func KanagawaTheme() Theme
KanagawaTheme - Japanese ink painting inspired, wave blue
func OneDarkTheme ¶
func OneDarkTheme() Theme
OneDarkTheme - Atom's signature theme with cyan accent
func SolarizedLightTheme ¶
func SolarizedLightTheme() Theme
SolarizedLightTheme - light version of Solarized
type ThemeColors ¶
type ThemeColors struct {
// Base palette
Background color.Color
Foreground color.Color
Muted color.Color
Border color.Color
BorderFocused color.Color
// Semantic colors
Primary color.Color
Secondary color.Color
Success color.Color
Warning color.Color
Error color.Color
Info color.Color
// Surface colors for layering
Surface0 color.Color
Surface1 color.Color
Surface2 color.Color
Surface3 color.Color
// Selection/highlight
Selection color.Color
Highlight color.Color
}
ThemeColors defines all colors used by the application.
type ThemeID ¶
type ThemeID string
ThemeID identifies a color theme.
const ( // Dark themes ThemeTokyoNight ThemeID = "tokyo-night" ThemeDracula ThemeID = "dracula" ThemeNord ThemeID = "nord" ThemeCatppuccin ThemeID = "catppuccin" ThemeGruvbox ThemeID = "gruvbox" ThemeSolarized ThemeID = "solarized" ThemeMonokai ThemeID = "monokai" ThemeRosePine ThemeID = "rose-pine" ThemeOneDark ThemeID = "one-dark" ThemeKanagawa ThemeID = "kanagawa" ThemeEverforest ThemeID = "everforest" ThemeAyuDark ThemeID = "ayu-dark" ThemeGitHubDark ThemeID = "github-dark" // Light themes ThemeSolarizedLight ThemeID = "solarized-light" ThemeGitHubLight ThemeID = "github-light" ThemeCatppuccinLatte ThemeID = "catppuccin-latte" ThemeOneLight ThemeID = "one-light" ThemeGruvboxLight ThemeID = "gruvbox-light" ThemeRosePineDawn ThemeID = "rose-pine-dawn" )
type ThemePreview ¶
type ThemePreview struct {
Theme ThemeID
}
ThemePreview is sent when user navigates through themes for live preview.
type ToastDismissed ¶
type ToastDismissed struct{}
ToastDismissed is sent when a toast should be dismissed
type ToastModel ¶
type ToastModel struct {
// contains filtered or unexported fields
}
ToastModel manages toast notifications
func (*ToastModel) SetStyles ¶
func (m *ToastModel) SetStyles(styles Styles)
SetStyles updates the toast styles (for theme changes).
func (*ToastModel) ShowError ¶
func (m *ToastModel) ShowError(message string) tea.Cmd
ShowError shows an error toast
func (*ToastModel) ShowInfo ¶
func (m *ToastModel) ShowInfo(message string) tea.Cmd
ShowInfo shows an info toast
func (*ToastModel) ShowSuccess ¶
func (m *ToastModel) ShowSuccess(message string) tea.Cmd
ShowSuccess shows a success toast
func (*ToastModel) ShowWarning ¶
func (m *ToastModel) ShowWarning(message string) tea.Cmd
ShowWarning shows a warning toast
func (*ToastModel) Update ¶
func (m *ToastModel) Update(msg tea.Msg) (*ToastModel, tea.Cmd)
Update handles messages
func (*ToastModel) Visible ¶
func (m *ToastModel) Visible() bool
Visible returns whether the toast is currently visible