Documentation
¶
Overview ¶
Package tui implements the terminal user interface using Bubble Tea.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColorPalette ¶ added in v0.2.4
type ColorPalette struct {
Primary lipgloss.Color
Secondary lipgloss.Color
Text lipgloss.Color
Muted lipgloss.Color
Local lipgloss.Color
Project lipgloss.Color
User lipgloss.Color
Pending lipgloss.Color
Border lipgloss.Color
}
ColorPalette holds the colors used for styling.
func GetPalette ¶ added in v0.2.4
func GetPalette(theme Theme) ColorPalette
GetPalette returns the color palette for the given theme. If ThemeAuto, it detects the terminal background.
type KeyBindings ¶
type KeyBindings struct {
Up []string
Down []string
PageUp []string
PageDown []string
Home []string
End []string
Enter []string
Quit []string
Local []string
Project []string
Toggle []string
Uninstall []string
Enable []string // Toggle plugin enabled/disabled state
Escape []string
Filter []string
Refresh []string
Mouse []string
}
KeyBindings defines all keyboard shortcuts.
func DefaultKeyBindings ¶
func DefaultKeyBindings() KeyBindings
DefaultKeyBindings returns the default key bindings.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the main application model.
func NewModel ¶
NewModel creates a new Model with the given client and working directory. Uses auto-detected theme.
func NewModelWithTheme ¶ added in v0.2.4
NewModelWithTheme creates a new Model with the specified theme.
type Operation ¶
type Operation struct {
PluginID string
Scope claude.Scope
OriginalScope claude.Scope // For uninstalls: the original scope to uninstall from
Type OperationType // Operation type: install, uninstall, enable, or disable
}
Operation represents a pending change to execute.
type OperationType ¶
type OperationType int
OperationType represents the type of operation to perform.
const ( OpInstall OperationType = iota OpUninstall OpEnable OpDisable )
type PluginState ¶
type PluginState struct {
Components *claude.PluginComponents
Version string
Description string
AuthorName string
AuthorEmail string
Marketplace string
ID string
InstallPath string
ExternalURL string
InstalledScope claude.Scope
Name string
Enabled bool
IsGroupHeader bool
IsExternal bool
}
PluginState holds the display state for a plugin. Fields are ordered for optimal memory alignment (strings/pointers first, bools last).
func PluginStateFromAvailable ¶
func PluginStateFromAvailable(p claude.AvailablePlugin) PluginState
PluginStateFromAvailable creates a PluginState from an available plugin.
func PluginStateFromInstalled ¶
func PluginStateFromInstalled(p claude.InstalledPlugin) PluginState
PluginStateFromInstalled creates a PluginState from an installed plugin. It reads the plugin manifest for description and scans for components.
type Styles ¶
type Styles struct {
// Pane styles
LeftPane lipgloss.Style
RightPane lipgloss.Style
// List item styles
Header lipgloss.Style
Selected lipgloss.Style
Normal lipgloss.Style
GroupHeader lipgloss.Style
Description lipgloss.Style
// Scope indicator styles
ScopeLocal lipgloss.Style
ScopeProject lipgloss.Style
ScopeUser lipgloss.Style
Pending lipgloss.Style
// Detail pane styles
DetailTitle lipgloss.Style
DetailLabel lipgloss.Style
DetailValue lipgloss.Style
DetailDescription lipgloss.Style
// Component list styles
ComponentCategory lipgloss.Style
ComponentItem lipgloss.Style
// Footer/help
Help lipgloss.Style
// Palette holds colors for modal borders and other direct color usage
Palette ColorPalette
}
Styles holds all the styles used in the TUI. Fields ordered for optimal memory alignment.
func DefaultStyles ¶
func DefaultStyles() Styles
DefaultStyles returns the default styles with auto-detected theme.
func DefaultStylesWithTheme ¶ added in v0.2.4
DefaultStylesWithTheme returns styles using the specified theme.
func (Styles) WithDimensions ¶
WithDimensions returns a new Styles with pane dimensions set.