ui

package
v0.8.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LayoutModeSingle  = "single"  // <50 cols: list only
	LayoutModeStacked = "stacked" // 50-79 cols: vertical stack
	LayoutModeDual    = "dual"    // 80+ cols: side-by-side
)

Layout mode names

View Source
const (
	IconClaude   = "🤖"
	IconGemini   = "✨"
	IconOpenCode = "🌐"
	IconCodex    = "💻"
	IconShell    = "🐚"
)

Tool Icons

Variables

View Source
var (
	ColorBg      lipgloss.Color
	ColorSurface lipgloss.Color
	ColorBorder  lipgloss.Color
	ColorText    lipgloss.Color
	ColorTextDim lipgloss.Color
	ColorAccent  lipgloss.Color
	ColorPurple  lipgloss.Color
	ColorCyan    lipgloss.Color
	ColorGreen   lipgloss.Color
	ColorYellow  lipgloss.Color
	ColorOrange  lipgloss.Color
	ColorRed     lipgloss.Color
	ColorComment lipgloss.Color
)

Active color variables (set by InitTheme)

View Source
var (
	BaseStyle      lipgloss.Style
	TitleStyle     lipgloss.Style
	PanelStyle     lipgloss.Style
	HighlightStyle lipgloss.Style
	DimStyle       lipgloss.Style
	ErrorStyle     lipgloss.Style
	SuccessStyle   lipgloss.Style
	WarningStyle   lipgloss.Style
	InfoStyle      lipgloss.Style
)

Base Styles

View Source
var (
	RunningStyle        lipgloss.Style
	WaitingStyle        lipgloss.Style
	IdleStyle           lipgloss.Style
	ErrorIndicatorStyle lipgloss.Style
)

Status Indicator Styles

View Source
var (
	MenuBarStyle       lipgloss.Style
	MenuKeyStyle       lipgloss.Style
	MenuDescStyle      lipgloss.Style
	MenuSeparatorStyle lipgloss.Style
)

Menu Bar Styles

View Source
var (
	SearchBoxStyle    lipgloss.Style
	SearchPromptStyle lipgloss.Style
	SearchMatchStyle  lipgloss.Style
)

Search Styles

View Source
var (
	DialogBoxStyle          lipgloss.Style
	DialogTitleStyle        lipgloss.Style
	DialogButtonStyle       lipgloss.Style
	DialogButtonActiveStyle lipgloss.Style
)

Dialog Styles

View Source
var (
	PreviewPanelStyle   lipgloss.Style
	PreviewTitleStyle   lipgloss.Style
	PreviewHeaderStyle  lipgloss.Style
	PreviewContentStyle lipgloss.Style
	PreviewMetaStyle    lipgloss.Style
)

Preview Pane Styles

View Source
var (
	ListItemStyle       lipgloss.Style
	ListItemActiveStyle lipgloss.Style
)

List Item Styles (used by legacy list.go component in tests)

View Source
var (
	TagStyle       lipgloss.Style
	TagActiveStyle lipgloss.Style
	TagErrorStyle  lipgloss.Style
)

Tag Styles

View Source
var (
	FolderStyle          lipgloss.Style
	FolderCollapsedStyle lipgloss.Style
)

Folder Styles

View Source
var (
	SessionItemStyle         lipgloss.Style
	SessionItemSelectedStyle lipgloss.Style
)

Session Item Styles

View Source
var (
	// Tree connector styles
	TreeConnectorStyle    lipgloss.Style
	TreeConnectorSelStyle lipgloss.Style

	// Session status indicator styles
	SessionStatusRunning  lipgloss.Style
	SessionStatusWaiting  lipgloss.Style
	SessionStatusIdle     lipgloss.Style
	SessionStatusError    lipgloss.Style
	SessionStatusSelStyle lipgloss.Style

	// Session title styles by state
	SessionTitleDefault  lipgloss.Style
	SessionTitleActive   lipgloss.Style
	SessionTitleError    lipgloss.Style
	SessionTitleSelStyle lipgloss.Style

	// Selection indicator
	SessionSelectionPrefix lipgloss.Style

	// Group item styles
	GroupExpandStyle   lipgloss.Style
	GroupNameStyle     lipgloss.Style
	GroupCountStyle    lipgloss.Style
	GroupHotkeyStyle   lipgloss.Style
	GroupStatusRunning lipgloss.Style
	GroupStatusWaiting lipgloss.Style

	// Group selected styles
	GroupNameSelStyle   lipgloss.Style
	GroupCountSelStyle  lipgloss.Style
	GroupExpandSelStyle lipgloss.Style
)

Session List Rendering Styles (PERFORMANCE: cached at package level) These styles are used by renderSessionItem() and renderGroupItem() to avoid repeated allocations on every View() call

View Source
var (
	SubtitleStyle lipgloss.Style
	ColorError    lipgloss.Color
	ColorSuccess  lipgloss.Color
	ColorWarning  lipgloss.Color
	ColorPrimary  lipgloss.Color
)

Additional Styles

View Source
var DefaultToolStyle lipgloss.Style

DefaultToolStyle is used when tool is not in cache

View Source
var LogoBorderStyle lipgloss.Style

LogoBorderStyle for the grid lines

View Source
var LogoFrames = [][]string{
	{"●", "◐", "○"},
}

LogoFrames kept for backward compatibility (empty state default)

View Source
var MenuStyle lipgloss.Style

Menu Styles

View Source
var TimestampStyle lipgloss.Style

Timestamp Style

View Source
var ToolStyleCache map[string]lipgloss.Style

ToolStyleCache provides pre-allocated styles for each tool type Avoids repeated lipgloss.NewStyle() calls in renderSessionItem()

View Source
var Version = "0.0.0"

Version is set by main.go for update checking

Functions

func GetToolStyle added in v0.8.9

func GetToolStyle(tool string) lipgloss.Style

GetToolStyle returns cached style for tool or default

func InitTheme added in v0.8.16

func InitTheme(theme string)

InitTheme sets the active color palette based on theme name Must be called before any UI rendering

func MenuKey(key, description string) string

MenuKey creates a formatted menu item with key and description

func RenderEmptyStateResponsiveForTest added in v0.6.1

func RenderEmptyStateResponsiveForTest(config EmptyStateConfig, width, height int) string

RenderEmptyStateResponsiveForTest exposes renderEmptyStateResponsive for testing

func RenderLogoCompact

func RenderLogoCompact(running, waiting, idle int) string

RenderLogoCompact renders the compact inline logo for the header Shows REAL status: running=●, waiting=◐, idle=○ Format: ⟨ ● │ ◐ │ ○ ⟩ (using angle brackets for modern look)

func RenderLogoIndicator

func RenderLogoIndicator(indicator string) string

RenderLogoIndicator renders a single indicator with appropriate color

func RenderLogoLarge

func RenderLogoLarge(running, waiting, idle int) string

RenderLogoLarge renders the large logo for empty state Shows REAL status: running=●, waiting=◐, idle=○ Format:

┌──┬──┬──┐
│● │◐ │○ │
└──┴──┴──┘

func SetVersion added in v0.4.0

func SetVersion(v string)

SetVersion sets the current version for update checking

func StatusIndicator

func StatusIndicator(status string) string

StatusIndicator returns a styled status indicator Standard symbols: ● running, ◐ waiting, ○ idle, ✕ error, ⟳ starting

func ToolColor added in v0.5.7

func ToolColor(tool string) lipgloss.Color

ToolColor returns the brand color for a given tool Claude=orange (Anthropic), Gemini=purple (Google AI), Codex=cyan, Aider=red

func ToolIcon

func ToolIcon(tool string) string

ToolIcon returns the icon for a given tool Checks user config for custom tools first, then falls back to built-ins

Types

type ConfirmDialog

type ConfirmDialog struct {
	// contains filtered or unexported fields
}

ConfirmDialog handles confirmation for destructive actions

func NewConfirmDialog

func NewConfirmDialog() *ConfirmDialog

NewConfirmDialog creates a new confirmation dialog

func (*ConfirmDialog) GetConfirmType

func (c *ConfirmDialog) GetConfirmType() ConfirmType

GetConfirmType returns the type of confirmation

func (*ConfirmDialog) GetTargetID

func (c *ConfirmDialog) GetTargetID() string

GetTargetID returns the session ID or group path being confirmed

func (*ConfirmDialog) Hide

func (c *ConfirmDialog) Hide()

Hide hides the dialog

func (*ConfirmDialog) IsVisible

func (c *ConfirmDialog) IsVisible() bool

IsVisible returns whether the dialog is visible

func (*ConfirmDialog) SetSize

func (c *ConfirmDialog) SetSize(width, height int)

SetSize updates dialog dimensions

func (*ConfirmDialog) ShowDeleteGroup

func (c *ConfirmDialog) ShowDeleteGroup(groupPath, groupName string)

ShowDeleteGroup shows confirmation for group deletion

func (*ConfirmDialog) ShowDeleteSession

func (c *ConfirmDialog) ShowDeleteSession(sessionID, sessionName string)

ShowDeleteSession shows confirmation for session deletion

func (*ConfirmDialog) Update

func (c *ConfirmDialog) Update(msg tea.KeyMsg) (*ConfirmDialog, tea.Cmd)

Update handles key events

func (*ConfirmDialog) View

func (c *ConfirmDialog) View() string

View renders the confirmation dialog

type ConfirmType

type ConfirmType int

ConfirmType indicates what action is being confirmed

const (
	ConfirmDeleteSession ConfirmType = iota
	ConfirmDeleteGroup
)

type EmptyStateConfig added in v0.5.8

type EmptyStateConfig struct {
	Icon     string
	Title    string
	Subtitle string
	Hints    []string // Full list of hints (will be reduced based on space)
}

EmptyStateConfig holds content for responsive empty state rendering

type ForkDialog added in v0.4.1

type ForkDialog struct {
	// contains filtered or unexported fields
}

ForkDialog handles the fork session dialog

func NewForkDialog added in v0.4.1

func NewForkDialog() *ForkDialog

NewForkDialog creates a new fork dialog

func (*ForkDialog) GetValues added in v0.4.1

func (d *ForkDialog) GetValues() (name, group string)

GetValues returns the current input values

func (*ForkDialog) Hide added in v0.4.1

func (d *ForkDialog) Hide()

Hide hides the dialog

func (*ForkDialog) IsVisible added in v0.4.1

func (d *ForkDialog) IsVisible() bool

IsVisible returns whether the dialog is visible

func (*ForkDialog) SetSize added in v0.4.1

func (d *ForkDialog) SetSize(width, height int)

SetSize sets the dialog dimensions

func (*ForkDialog) Show added in v0.4.1

func (d *ForkDialog) Show(originalName, projectPath, groupPath string)

Show displays the dialog with pre-filled values

func (*ForkDialog) Update added in v0.4.1

func (d *ForkDialog) Update(msg tea.Msg) (*ForkDialog, tea.Cmd)

Update handles input events

func (*ForkDialog) View added in v0.4.1

func (d *ForkDialog) View() string

View renders the dialog

type GlobalSearch added in v0.5.3

type GlobalSearch struct {
	// contains filtered or unexported fields
}

GlobalSearch represents the global session search overlay

func NewGlobalSearch added in v0.5.3

func NewGlobalSearch() *GlobalSearch

NewGlobalSearch creates a new global search overlay

func (*GlobalSearch) Hide added in v0.5.3

func (gs *GlobalSearch) Hide()

Hide hides the overlay

func (*GlobalSearch) IsVisible added in v0.5.3

func (gs *GlobalSearch) IsVisible() bool

IsVisible returns whether the overlay is visible

func (*GlobalSearch) MarkInAgentDeck added in v0.5.3

func (gs *GlobalSearch) MarkInAgentDeck(instances []*session.Instance)

MarkInAgentDeck marks which results are already in Agent Deck

func (*GlobalSearch) RefreshStats added in v0.5.3

func (gs *GlobalSearch) RefreshStats()

RefreshStats updates the stats from the index

func (*GlobalSearch) Selected added in v0.5.3

func (gs *GlobalSearch) Selected() *GlobalSearchResult

Selected returns the currently selected result

func (*GlobalSearch) SetIndex added in v0.5.3

func (gs *GlobalSearch) SetIndex(index *session.GlobalSearchIndex)

SetIndex sets the search index reference

func (*GlobalSearch) SetSize added in v0.5.3

func (gs *GlobalSearch) SetSize(width, height int)

SetSize sets the dimensions of the overlay

func (*GlobalSearch) Show added in v0.5.3

func (gs *GlobalSearch) Show()

Show makes the overlay visible

func (*GlobalSearch) Update added in v0.5.3

func (gs *GlobalSearch) Update(msg tea.Msg) (*GlobalSearch, tea.Cmd)

Update handles messages for the overlay

func (*GlobalSearch) View added in v0.5.3

func (gs *GlobalSearch) View() string

View renders the overlay with split-pane layout

func (*GlobalSearch) WantsSwitchToLocal added in v0.5.3

func (gs *GlobalSearch) WantsSwitchToLocal() bool

WantsSwitchToLocal returns true if user pressed Tab to switch to local search

type GlobalSearchResult added in v0.5.3

type GlobalSearchResult struct {
	SessionID   string
	Summary     string
	Snippet     string
	Content     string // Full conversation content for preview
	CWD         string
	ModTime     time.Time // Last modified time
	Score       int       // Fuzzy match score (higher = better match)
	MatchCount  int       // Number of query matches in content
	InAgentDeck bool      // True if this session is already in Agent Deck
	InstanceID  string    // Agent Deck instance ID if exists
}

GlobalSearchResult wraps a search result for UI display

type GroupDialog

type GroupDialog struct {
	// contains filtered or unexported fields
}

GroupDialog handles group creation, renaming, and moving sessions

func NewGroupDialog

func NewGroupDialog() *GroupDialog

NewGroupDialog creates a new group dialog

func (*GroupDialog) GetGroupPath

func (g *GroupDialog) GetGroupPath() string

GetGroupPath returns the group path being edited (or parent path for subgroup creation)

func (*GroupDialog) GetParentPath

func (g *GroupDialog) GetParentPath() string

GetParentPath returns the parent path for subgroup creation

func (*GroupDialog) GetSelectedGroup

func (g *GroupDialog) GetSelectedGroup() string

GetSelectedGroup returns the selected group for move mode

func (*GroupDialog) GetSessionID

func (g *GroupDialog) GetSessionID() string

GetSessionID returns the session ID being renamed

func (*GroupDialog) GetValue

func (g *GroupDialog) GetValue() string

GetValue returns the input value

func (*GroupDialog) HasParent

func (g *GroupDialog) HasParent() bool

HasParent returns true if creating a subgroup under a parent

func (*GroupDialog) Hide

func (g *GroupDialog) Hide()

Hide hides the dialog

func (*GroupDialog) IsVisible

func (g *GroupDialog) IsVisible() bool

IsVisible returns whether the dialog is visible

func (*GroupDialog) Mode

func (g *GroupDialog) Mode() GroupDialogMode

Mode returns the current dialog mode

func (*GroupDialog) SetSize

func (g *GroupDialog) SetSize(width, height int)

SetSize sets the dialog size

func (*GroupDialog) Show

func (g *GroupDialog) Show()

Show shows the dialog in create mode (root level group)

func (*GroupDialog) ShowCreateSubgroup

func (g *GroupDialog) ShowCreateSubgroup(parentPath, parentName string)

ShowCreateSubgroup shows the dialog for creating a subgroup under a parent

func (*GroupDialog) ShowMove

func (g *GroupDialog) ShowMove(groups []string)

ShowMove shows the dialog for moving a session to a group

func (*GroupDialog) ShowRename

func (g *GroupDialog) ShowRename(currentPath, currentName string)

ShowRename shows the dialog in rename mode

func (*GroupDialog) ShowRenameSession

func (g *GroupDialog) ShowRenameSession(sessionID, currentName string)

ShowRenameSession shows the dialog for renaming a session

func (*GroupDialog) Update

func (g *GroupDialog) Update(msg tea.KeyMsg) (*GroupDialog, tea.Cmd)

Update handles input

func (*GroupDialog) Validate

func (g *GroupDialog) Validate() string

Validate checks if the dialog values are valid and returns an error message if not

func (*GroupDialog) View

func (g *GroupDialog) View() string

View renders the dialog

type GroupDialogMode

type GroupDialogMode int

GroupDialogMode represents the dialog mode

const (
	GroupDialogCreate GroupDialogMode = iota
	GroupDialogRename
	GroupDialogMove
	GroupDialogRenameSession
)

type HelpOverlay added in v0.3.0

type HelpOverlay struct {
	// contains filtered or unexported fields
}

HelpOverlay shows keyboard shortcuts in a modal

func NewHelpOverlay added in v0.3.0

func NewHelpOverlay() *HelpOverlay

NewHelpOverlay creates a new help overlay

func (*HelpOverlay) Hide added in v0.3.0

func (h *HelpOverlay) Hide()

Hide hides the help overlay

func (*HelpOverlay) IsVisible added in v0.3.0

func (h *HelpOverlay) IsVisible() bool

IsVisible returns whether the help overlay is visible

func (*HelpOverlay) SetSize added in v0.3.0

func (h *HelpOverlay) SetSize(width, height int)

SetSize sets the dimensions for centering

func (*HelpOverlay) Show added in v0.3.0

func (h *HelpOverlay) Show()

Show makes the help overlay visible

func (*HelpOverlay) Update added in v0.3.0

func (h *HelpOverlay) Update(msg tea.Msg) (*HelpOverlay, tea.Cmd)

Update handles messages for the help overlay

func (*HelpOverlay) View added in v0.3.0

func (h *HelpOverlay) View() string

View renders the help overlay

type Home

type Home struct {
	// contains filtered or unexported fields
}

Home is the main application model

func NewHome

func NewHome() *Home

NewHome creates a new home model with the default profile

func NewHomeWithProfile added in v0.3.0

func NewHomeWithProfile(profile string) *Home

NewHomeWithProfile creates a new home model with the specified profile

func NewTestHome added in v0.6.1

func NewTestHome() *Home

NewTestHome creates a minimal Home instance for testing

func (*Home) Init

func (h *Home) Init() tea.Cmd

Init initializes the model

func (*Home) RenderPanelTitleForTest added in v0.6.1

func (h *Home) RenderPanelTitleForTest(title string, width int) string

RenderPanelTitleForTest exposes renderPanelTitle for testing

func (*Home) RenderPreviewPaneForTest added in v0.6.1

func (h *Home) RenderPreviewPaneForTest(width, height int) string

RenderPreviewPaneForTest exposes renderPreviewPane for testing

func (*Home) RenderSessionListForTest added in v0.6.1

func (h *Home) RenderSessionListForTest(width, height int) string

RenderSessionListForTest exposes renderSessionList for testing

func (*Home) SetCursorForTest added in v0.6.1

func (h *Home) SetCursorForTest(cursor int)

SetCursorForTest sets the cursor field for testing

func (*Home) SetFlatItemsForTest added in v0.6.1

func (h *Home) SetFlatItemsForTest(items []session.Item)

SetFlatItemsForTest sets the flatItems field for testing

func (*Home) SetSizeForTest added in v0.6.1

func (h *Home) SetSizeForTest(width, height int)

SetSizeForTest sets the width and height fields for testing

func (*Home) Update

func (h *Home) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages

func (*Home) View

func (h *Home) View() string

View renders the UI

type List

type List struct {
	// contains filtered or unexported fields
}

List manages session list display

func NewList

func NewList() *List

NewList creates a new list

func (*List) Cursor

func (l *List) Cursor() int

Cursor returns current cursor position

func (*List) Len

func (l *List) Len() int

Len returns number of items

func (*List) MoveDown

func (l *List) MoveDown()

MoveDown moves cursor down

func (*List) MoveUp

func (l *List) MoveUp()

MoveUp moves cursor up

func (*List) Selected

func (l *List) Selected() *session.Instance

Selected returns the currently selected item

func (*List) SetItems

func (l *List) SetItems(items []*session.Instance)

SetItems sets the list items

func (*List) SetSize

func (l *List) SetSize(width, height int)

SetSize sets the list dimensions

func (*List) ToggleFolder

func (l *List) ToggleFolder(name string)

ToggleFolder toggles the current folder

func (*List) View

func (l *List) View() string

View renders the list

type MCPColumn added in v0.5.3

type MCPColumn int

MCPColumn represents Attached or Available column

const (
	MCPColumnAttached MCPColumn = iota
	MCPColumnAvailable
)

type MCPDialog added in v0.5.3

type MCPDialog struct {
	// contains filtered or unexported fields
}

MCPDialog handles MCP management for Claude and Gemini sessions

func NewMCPDialog added in v0.5.3

func NewMCPDialog() *MCPDialog

NewMCPDialog creates a new MCP management dialog

func (*MCPDialog) Apply added in v0.5.3

func (m *MCPDialog) Apply() error

Apply saves the changes to LOCAL (.mcp.json) and GLOBAL (Claude/Gemini config)

func (*MCPDialog) GetError added in v0.5.3

func (m *MCPDialog) GetError() error

GetError returns any error that occurred

func (*MCPDialog) GetProjectPath added in v0.5.3

func (m *MCPDialog) GetProjectPath() string

GetProjectPath returns the project path being managed

func (*MCPDialog) GetSessionID added in v0.5.4

func (m *MCPDialog) GetSessionID() string

GetSessionID returns the session ID being managed

func (*MCPDialog) HasChanged added in v0.5.3

func (m *MCPDialog) HasChanged() bool

HasChanged returns true if any MCPs were changed (either scope)

func (*MCPDialog) HasItems added in v0.5.3

func (m *MCPDialog) HasItems() bool

HasItems returns true if there are MCPs to manage

func (*MCPDialog) Hide added in v0.5.3

func (m *MCPDialog) Hide()

Hide hides the dialog

func (*MCPDialog) IsVisible added in v0.5.3

func (m *MCPDialog) IsVisible() bool

IsVisible returns whether the dialog is visible

func (*MCPDialog) Move added in v0.5.3

func (m *MCPDialog) Move()

Move moves the selected item between Attached <-> Available

func (*MCPDialog) SetSize added in v0.5.3

func (m *MCPDialog) SetSize(width, height int)

SetSize sets the dialog size

func (*MCPDialog) Show added in v0.5.3

func (m *MCPDialog) Show(projectPath string, sessionID string, tool string) error

Show displays the MCP dialog for a project

func (*MCPDialog) Update added in v0.5.3

func (m *MCPDialog) Update(msg tea.KeyMsg) (*MCPDialog, tea.Cmd)

Update handles input

func (*MCPDialog) View added in v0.5.3

func (m *MCPDialog) View() string

View renders the dialog

type MCPItem added in v0.5.3

type MCPItem struct {
	Name        string
	Description string
	IsOrphan    bool // True if MCP is attached but not in config.toml pool
	IsPooled    bool // True if this MCP uses socket pool
}

MCPItem represents an MCP in the dialog list

type MCPScope added in v0.5.3

type MCPScope int

MCPScope represents LOCAL or GLOBAL scope

const (
	MCPScopeLocal MCPScope = iota
	MCPScopeGlobal
)
type Menu struct {
	// contains filtered or unexported fields
}

Menu shows bottom menu bar

func NewMenu

func NewMenu() *Menu

NewMenu creates a new menu

func (m *Menu) SetWidth(width int)

SetWidth sets menu width

func (m *Menu) View() string

View renders the menu

type NewDialog

type NewDialog struct {
	// contains filtered or unexported fields
}

NewDialog represents the new session creation dialog

func NewNewDialog

func NewNewDialog() *NewDialog

NewNewDialog creates a new NewDialog instance

func (*NewDialog) GetSelectedGroup

func (d *NewDialog) GetSelectedGroup() string

GetSelectedGroup returns the parent group path

func (*NewDialog) GetValues

func (d *NewDialog) GetValues() (name, path, command string)

GetValues returns the current dialog values with expanded paths

func (*NewDialog) Hide

func (d *NewDialog) Hide()

Hide hides the dialog

func (*NewDialog) IsVisible

func (d *NewDialog) IsVisible() bool

IsVisible returns whether the dialog is visible

func (*NewDialog) SetDefaultTool added in v0.4.3

func (d *NewDialog) SetDefaultTool(tool string)

SetDefaultTool sets the pre-selected command based on tool name Call this before Show/ShowInGroup to apply user's preferred default

func (*NewDialog) SetPathSuggestions

func (d *NewDialog) SetPathSuggestions(paths []string)

SetPathSuggestions sets the available path suggestions for autocomplete

func (*NewDialog) SetSize

func (d *NewDialog) SetSize(width, height int)

SetSize sets the dialog dimensions

func (*NewDialog) Show

func (d *NewDialog) Show()

Show makes the dialog visible (uses default group)

func (*NewDialog) ShowInGroup

func (d *NewDialog) ShowInGroup(groupPath, groupName string)

ShowInGroup shows the dialog with a pre-selected parent group

func (*NewDialog) Update

func (d *NewDialog) Update(msg tea.Msg) (*NewDialog, tea.Cmd)

Update handles key messages

func (*NewDialog) Validate

func (d *NewDialog) Validate() string

Validate checks if the dialog values are valid and returns an error message if not

func (*NewDialog) View

func (d *NewDialog) View() string

View renders the dialog

type Preview

type Preview struct {
	// contains filtered or unexported fields
}

Preview shows session terminal content

func NewPreview

func NewPreview() *Preview

NewPreview creates a new preview pane

func (*Preview) SetContent

func (p *Preview) SetContent(content, title string)

SetContent sets the preview content

func (*Preview) SetSize

func (p *Preview) SetSize(width, height int)

SetSize sets preview dimensions

func (*Preview) View

func (p *Preview) View() string

View renders the preview

type Search struct {
	// contains filtered or unexported fields
}

Search represents the search overlay component

func NewSearch

func NewSearch() *Search

NewSearch creates a new search overlay

func (*Search) Hide

func (s *Search) Hide()

Hide hides the search overlay

func (*Search) IsVisible

func (s *Search) IsVisible() bool

IsVisible returns whether the search overlay is visible

func (*Search) Selected

func (s *Search) Selected() *session.Instance

Selected returns the currently selected item

func (*Search) SetItems

func (s *Search) SetItems(items []*session.Instance)

SetItems sets the full list of items to search through

func (*Search) SetSize

func (s *Search) SetSize(width, height int)

SetSize sets the dimensions of the search overlay

func (*Search) Show

func (s *Search) Show()

Show makes the search overlay visible

func (*Search) Update

func (s *Search) Update(msg tea.Msg) (*Search, tea.Cmd)

Update handles messages for the search overlay Returns the updated Search and any command to execute

func (*Search) View

func (s *Search) View() string

View renders the search overlay

func (*Search) WantsSwitchToGlobal added in v0.5.3

func (s *Search) WantsSwitchToGlobal() bool

WantsSwitchToGlobal returns true if user pressed Tab to switch to global search

type SettingType added in v0.8.16

type SettingType int

SettingType identifies which setting is being edited

const (
	SettingTheme SettingType = iota // Theme must be first (index 0)
	SettingDefaultTool
	SettingDangerousMode
	SettingClaudeConfigDir
	SettingCheckForUpdates
	SettingAutoUpdate
	SettingLogMaxSize
	SettingLogMaxLines
	SettingRemoveOrphans
	SettingGlobalSearchEnabled
	SettingSearchTier
	SettingRecentDays
)

type SettingsPanel added in v0.8.16

type SettingsPanel struct {
	// contains filtered or unexported fields
}

SettingsPanel displays and edits user configuration

func NewSettingsPanel added in v0.8.16

func NewSettingsPanel() *SettingsPanel

NewSettingsPanel creates a new settings panel

func (*SettingsPanel) GetConfig added in v0.8.16

func (s *SettingsPanel) GetConfig() *session.UserConfig

GetConfig returns a UserConfig with current panel values

func (*SettingsPanel) Hide added in v0.8.16

func (s *SettingsPanel) Hide()

Hide hides the settings panel

func (*SettingsPanel) IsVisible added in v0.8.16

func (s *SettingsPanel) IsVisible() bool

IsVisible returns whether the panel is visible

func (*SettingsPanel) LoadConfig added in v0.8.16

func (s *SettingsPanel) LoadConfig(config *session.UserConfig)

LoadConfig populates panel values from a UserConfig

func (*SettingsPanel) NeedsRestart added in v0.8.16

func (s *SettingsPanel) NeedsRestart() bool

NeedsRestart returns true if changes require a restart

func (*SettingsPanel) SetSize added in v0.8.16

func (s *SettingsPanel) SetSize(width, height int)

SetSize sets the panel dimensions

func (*SettingsPanel) Show added in v0.8.16

func (s *SettingsPanel) Show()

Show displays the settings panel and loads current config

func (*SettingsPanel) Update added in v0.8.16

func (s *SettingsPanel) Update(msg tea.KeyMsg) (*SettingsPanel, tea.Cmd, bool)

Update handles input and returns (panel, cmd, valueChanged)

func (*SettingsPanel) View added in v0.8.16

func (s *SettingsPanel) View() string

View renders the settings panel

type SetupWizard added in v0.8.16

type SetupWizard struct {
	// contains filtered or unexported fields
}

SetupWizard represents the first-time setup wizard dialog It guides users through initial configuration when config.toml doesn't exist

func NewSetupWizard added in v0.8.16

func NewSetupWizard() *SetupWizard

NewSetupWizard creates a new setup wizard

func (*SetupWizard) GetConfig added in v0.8.16

func (w *SetupWizard) GetConfig() *session.UserConfig

GetConfig returns the user configuration based on wizard selections

func (*SetupWizard) Hide added in v0.8.16

func (w *SetupWizard) Hide()

Hide hides the wizard

func (*SetupWizard) IsComplete added in v0.8.16

func (w *SetupWizard) IsComplete() bool

IsComplete returns whether the wizard has been completed

func (*SetupWizard) IsVisible added in v0.8.16

func (w *SetupWizard) IsVisible() bool

IsVisible returns whether the wizard is visible

func (*SetupWizard) SetSize added in v0.8.16

func (w *SetupWizard) SetSize(width, height int)

SetSize updates the wizard dimensions

func (*SetupWizard) Show added in v0.8.16

func (w *SetupWizard) Show()

Show makes the wizard visible

func (*SetupWizard) Update added in v0.8.16

func (w *SetupWizard) Update(msg tea.Msg) (*SetupWizard, tea.Cmd)

Update handles key events for the wizard

func (*SetupWizard) View added in v0.8.16

func (w *SetupWizard) View() string

View renders the wizard dialog

type StorageWatcher added in v0.6.1

type StorageWatcher struct {
	// contains filtered or unexported fields
}

StorageWatcher monitors sessions.json for external changes

func NewStorageWatcher added in v0.6.1

func NewStorageWatcher(storagePath string) (*StorageWatcher, error)

NewStorageWatcher creates a watcher for the given storage file

func (*StorageWatcher) Close added in v0.6.1

func (sw *StorageWatcher) Close() error

Close stops the watcher and releases resources

func (*StorageWatcher) NotifySave added in v0.7.0

func (sw *StorageWatcher) NotifySave()

NotifySave should be called by the TUI right before it saves to storage. This marks the current time so the watcher can ignore the resulting file change.

func (*StorageWatcher) ReloadChannel added in v0.6.1

func (sw *StorageWatcher) ReloadChannel() <-chan struct{}

ReloadChannel returns the channel that signals when reload is needed

func (*StorageWatcher) Start added in v0.6.1

func (sw *StorageWatcher) Start()

Start begins watching for file changes (non-blocking)

type Theme added in v0.8.16

type Theme string

Theme represents the current color scheme

const (
	ThemeDark  Theme = "dark"
	ThemeLight Theme = "light"
)

func GetCurrentTheme added in v0.8.16

func GetCurrentTheme() Theme

GetCurrentTheme returns the active theme

type Tree

type Tree struct {
	// contains filtered or unexported fields
}

Tree manages folder structure

func NewTree

func NewTree() *Tree

NewTree creates a new tree

func (*Tree) AddFolder

func (t *Tree) AddFolder(name string)

AddFolder adds a folder to the tree

func (*Tree) Clear

func (t *Tree) Clear()

Clear removes all folders

func (*Tree) GetFolder

func (t *Tree) GetFolder(name string) *TreeFolder

GetFolder returns a folder by name

func (*Tree) GetFolders

func (t *Tree) GetFolders() []string

GetFolders returns all folder names in order

func (*Tree) IsFolderExpanded

func (t *Tree) IsFolderExpanded(name string) bool

IsFolderExpanded returns whether a folder is expanded

func (*Tree) SetFolderCount

func (t *Tree) SetFolderCount(name string, count int)

SetFolderCount sets the session count for a folder

func (*Tree) ToggleFolder

func (t *Tree) ToggleFolder(name string)

ToggleFolder toggles folder expansion

func (*Tree) View

func (t *Tree) View(selectedFolder string) string

View renders the tree (just folders, not sessions)

type TreeFolder

type TreeFolder struct {
	Name     string
	Expanded bool
	Count    int
}

TreeFolder represents a folder in the tree

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL