Documentation
¶
Overview ¶
Package components provides reusable Bubbles components with Dracula theme styling. ABOUTME: Help system component for displaying key bindings and context-aware help ABOUTME: Wraps bubbles.Help with Dracula theme and mode-based key binding display
Package components provides reusable Bubbles components with Dracula theme styling. ABOUTME: List component for browsing and selecting items with fuzzy search ABOUTME: Wraps bubbles.List with Dracula theme for history, skills, commands, and plugins
Package components provides reusable Bubbles components with Dracula theme styling. ABOUTME: Progress bar component for visual feedback during operations ABOUTME: Wraps bubbles.Progress with Dracula theme for streaming, tool execution, and token usage
Package components provides reusable Bubbles components with Dracula theme styling. ABOUTME: Table component for displaying structured data with sorting and navigation ABOUTME: Wraps bubbles.Table with Dracula theme and additional features
Index ¶
- func KeyBindingsToKeyMap(bindings []KeyBinding) []key.Binding
- type CommandItem
- type ConversationItem
- type ConversationMetadata
- type DefaultListItem
- type Help
- func (h *Help) IsExpanded() bool
- func (h *Help) SetExpanded(expanded bool)
- func (h *Help) SetMode(mode HelpMode)
- func (h *Help) SetWidth(width int)
- func (h *Help) ToggleExpanded()
- func (h *Help) Update(_ tea.Msg) tea.Cmd
- func (h *Help) View() string
- func (h *Help) ViewAsOverlay(screenWidth, screenHeight int) string
- func (h *Help) ViewCompact() string
- func (h *Help) ViewExpanded() string
- type HelpMode
- type KeyBinding
- type KeyBindingCategory
- type List
- func CommandsList(commands []CommandItem, width, height int) *List
- func ConversationHistoryList(conversations []ConversationItem, width, height int) *List
- func NewList(items []ListItem, width, height int, listType ListType) *List
- func PluginsList(plugins []PluginItem, width, height int) *List
- func SkillsList(skills []SkillItem, width, height int) *List
- func (l *List) FuzzySearch(query string)
- func (l *List) Index() int
- func (l *List) SelectedItem() ListItem
- func (l *List) SetHeight(height int)
- func (l *List) SetItems(items []ListItem)
- func (l *List) SetTitle(title string)
- func (l *List) SetWidth(width int)
- func (l *List) Update(msg tea.Msg) tea.Cmd
- func (l *List) View() string
- type ListItem
- type ListType
- type MCPServerInfo
- type PluginInfo
- type PluginItem
- type Progress
- func BatchProgress(current, total int, operation string, width int) *Progress
- func NewProgress(progressType ProgressType, width int) *Progress
- func StreamingProgress(chunksReceived, estimatedTotal int, width int) *Progress
- func TokenUsageProgress(currentTokens, maxTokens int, width int) *Progress
- func ToolExecutionProgress(toolName string, width int) *Progress
- func (p *Progress) GetProgress() float64
- func (p *Progress) IncrementProgress(delta float64)
- func (p *Progress) IsComplete() bool
- func (p *Progress) Reset()
- func (p *Progress) SetLabel(label string)
- func (p *Progress) SetProgress(value float64)
- func (p *Progress) SetProgressValues(current, total float64)
- func (p *Progress) SetWidth(width int)
- func (p *Progress) Update(msg tea.Msg) tea.Cmd
- func (p *Progress) View() string
- func (p *Progress) ViewCompact() string
- type ProgressBar
- type ProgressBarMsg
- type ProgressCompleteMsg
- type ProgressType
- type SkillItem
- type Table
- func ConversationMetadataTable(metadata []ConversationMetadata, width, height int) *Table
- func MCPServerTable(servers []MCPServerInfo, width, height int) *Table
- func NewTable(columns []table.Column, rows []table.Row, width, height int) *Table
- func PluginTable(plugins []PluginInfo, width, height int) *Table
- func ToolResultsTable(results []ToolResult, width, height int) *Table
- func (t *Table) Blur()
- func (t *Table) Cursor() int
- func (t *Table) Focus()
- func (t *Table) SelectedRow() table.Row
- func (t *Table) SetColumns(columns []table.Column)
- func (t *Table) SetHeight(height int)
- func (t *Table) SetRows(rows []table.Row)
- func (t *Table) SetTitle(title string)
- func (t *Table) SetWidth(width int)
- func (t *Table) Update(msg tea.Msg) tea.Cmd
- func (t *Table) View() string
- type ToolResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyBindingsToKeyMap ¶
func KeyBindingsToKeyMap(bindings []KeyBinding) []key.Binding
KeyBindingsToKeyMap converts KeyBinding slice to bubbles key.Binding slice for use with bubbles.Help.View()
Types ¶
type CommandItem ¶
CommandItem represents a command in the commands list
func (CommandItem) FilterValue ¶
func (c CommandItem) FilterValue() string
FilterValue implements list.Item
func (CommandItem) GetDescription ¶
func (c CommandItem) GetDescription() string
GetDescription implements ListItem
func (CommandItem) GetMetadata ¶
func (c CommandItem) GetMetadata() string
GetMetadata implements ListItem
func (CommandItem) GetSearchText ¶
func (c CommandItem) GetSearchText() string
GetSearchText implements ListItem
type ConversationItem ¶
type ConversationItem struct {
ID string
Title string
Created string
MessageCount int
TokenCount int
Model string
IsFavorite bool
}
ConversationItem represents a conversation in the history list
func (ConversationItem) FilterValue ¶
func (c ConversationItem) FilterValue() string
FilterValue implements list.Item
func (ConversationItem) GetDescription ¶
func (c ConversationItem) GetDescription() string
GetDescription implements ListItem
func (ConversationItem) GetMetadata ¶
func (c ConversationItem) GetMetadata() string
GetMetadata implements ListItem
func (ConversationItem) GetSearchText ¶
func (c ConversationItem) GetSearchText() string
GetSearchText implements ListItem
func (ConversationItem) GetTitle ¶
func (c ConversationItem) GetTitle() string
GetTitle implements ListItem
type ConversationMetadata ¶
type ConversationMetadata struct {
ID string
Created string
MessageCount string
TotalTokens string
Model string
}
ConversationMetadata represents conversation metadata for table display
type DefaultListItem ¶
type DefaultListItem struct {
// contains filtered or unexported fields
}
DefaultListItem is a default implementation of ListItem
func NewDefaultListItem ¶
func NewDefaultListItem(title, description, metadata string) DefaultListItem
NewDefaultListItem creates a new default list item
func (DefaultListItem) FilterValue ¶
func (i DefaultListItem) FilterValue() string
FilterValue implements list.Item
func (DefaultListItem) GetDescription ¶
func (i DefaultListItem) GetDescription() string
GetDescription implements ListItem
func (DefaultListItem) GetMetadata ¶
func (i DefaultListItem) GetMetadata() string
GetMetadata implements ListItem
func (DefaultListItem) GetSearchText ¶
func (i DefaultListItem) GetSearchText() string
GetSearchText implements ListItem
func (DefaultListItem) GetTitle ¶
func (i DefaultListItem) GetTitle() string
GetTitle implements ListItem
type Help ¶
type Help struct {
// contains filtered or unexported fields
}
Help wraps bubbles.Help with Dracula styling and context awareness
func DefaultChatHelp ¶
DefaultChatHelp returns default help for chat mode
func DefaultHistoryHelp ¶
DefaultHistoryHelp returns default help for history mode
func DefaultToolsHelp ¶
DefaultToolsHelp returns default help for tools mode
func (*Help) IsExpanded ¶
IsExpanded returns whether help is expanded
func (*Help) SetExpanded ¶
SetExpanded sets the expanded state
func (*Help) ToggleExpanded ¶
func (h *Help) ToggleExpanded()
ToggleExpanded toggles between short and full help
func (*Help) ViewAsOverlay ¶
ViewAsOverlay renders help as a centered overlay
func (*Help) ViewCompact ¶
ViewCompact renders a compact single-line help
func (*Help) ViewExpanded ¶
ViewExpanded renders full categorized help
type HelpMode ¶
type HelpMode int
HelpMode represents different help contexts
const ( // HelpModeChat shows help for chat interface HelpModeChat HelpMode = iota // HelpModeHistory shows help for history browser HelpModeHistory // HelpModeTools shows help for tools view HelpModeTools // HelpModeApproval shows help for tool approval HelpModeApproval // HelpModeSearch shows help for search mode HelpModeSearch // HelpModeQuickActions shows help for quick actions HelpModeQuickActions )
type KeyBinding ¶
KeyBinding represents a key binding with description
type KeyBindingCategory ¶
type KeyBindingCategory struct {
Name string
Bindings []KeyBinding
}
KeyBindingCategory represents a category of key bindings
type List ¶
type List struct {
// contains filtered or unexported fields
}
List wraps bubbles.List with Dracula styling and fuzzy search
func CommandsList ¶
func CommandsList(commands []CommandItem, width, height int) *List
CommandsList creates a list for commands selector
func ConversationHistoryList ¶
func ConversationHistoryList(conversations []ConversationItem, width, height int) *List
ConversationHistoryList creates a list for conversation history
func PluginsList ¶
func PluginsList(plugins []PluginItem, width, height int) *List
PluginsList creates a list for plugin browser
func SkillsList ¶
SkillsList creates a list for skills selector
func (*List) FuzzySearch ¶
FuzzySearch filters items using fuzzy search
func (*List) SelectedItem ¶
SelectedItem returns the currently selected item
type ListItem ¶
type ListItem interface {
list.Item
// GetSearchText returns the text to search against
GetSearchText() string
// GetTitle returns the item title
GetTitle() string
// GetDescription returns the item description
GetDescription() string
// GetMetadata returns additional metadata
GetMetadata() string
}
ListItem is an item in the list
type ListType ¶
type ListType int
ListType represents different types of lists
const ( // ListTypeHistory for conversation history browser ListTypeHistory ListType = iota // ListTypeSkills for skills selector ListTypeSkills // ListTypeCommands for commands selector ListTypeCommands // ListTypePlugins for plugin browser ListTypePlugins // ListTypeMCPServers for MCP server browser ListTypeMCPServers )
type MCPServerInfo ¶
MCPServerInfo represents MCP server information for table display
type PluginInfo ¶
PluginInfo represents plugin information for table display
type PluginItem ¶
PluginItem represents a plugin in the plugins list
func (PluginItem) FilterValue ¶
func (p PluginItem) FilterValue() string
FilterValue implements list.Item
func (PluginItem) GetDescription ¶
func (p PluginItem) GetDescription() string
GetDescription implements ListItem
func (PluginItem) GetMetadata ¶
func (p PluginItem) GetMetadata() string
GetMetadata implements ListItem
func (PluginItem) GetSearchText ¶
func (p PluginItem) GetSearchText() string
GetSearchText implements ListItem
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
Progress wraps bubbles.Progress with Dracula styling
func BatchProgress ¶
BatchProgress creates a progress bar for batch operations
func NewProgress ¶
func NewProgress(progressType ProgressType, width int) *Progress
NewProgress creates a new progress bar with Dracula styling
func StreamingProgress ¶
StreamingProgress creates a progress bar for API streaming
func TokenUsageProgress ¶
TokenUsageProgress creates a progress bar for token/context usage
func ToolExecutionProgress ¶
ToolExecutionProgress creates a progress bar for tool execution
func (*Progress) GetProgress ¶
GetProgress returns the current progress value
func (*Progress) IncrementProgress ¶
IncrementProgress increments the progress by a delta
func (*Progress) IsComplete ¶
IsComplete returns true if progress is at 100%
func (*Progress) SetProgress ¶
SetProgress updates the progress value (0.0 to 1.0)
func (*Progress) SetProgressValues ¶
SetProgressValues sets current and total values (calculates percentage)
func (*Progress) ViewCompact ¶
ViewCompact renders a compact version without label
type ProgressBar ¶
type ProgressBar struct {
*Progress
}
ProgressBar is a simple wrapper for backward compatibility
func NewProgressBar ¶
func NewProgressBar(width int) *ProgressBar
NewProgressBar creates a new progress bar (backward compatible)
type ProgressBarMsg ¶
ProgressBarMsg is a message for updating progress
type ProgressCompleteMsg ¶
type ProgressCompleteMsg struct{}
ProgressCompleteMsg is sent when progress reaches 100%
type ProgressType ¶
type ProgressType int
ProgressType represents different types of progress indicators
const ( // ProgressTypeStreaming indicates API streaming progress ProgressTypeStreaming ProgressType = iota // ProgressTypeToolExecution indicates tool execution progress ProgressTypeToolExecution // ProgressTypeTokenUsage indicates token/context usage ProgressTypeTokenUsage // ProgressTypeBatch indicates batch operation progress ProgressTypeBatch )
type SkillItem ¶
SkillItem represents a skill in the skills list
func (SkillItem) FilterValue ¶
FilterValue implements list.Item
func (SkillItem) GetDescription ¶
GetDescription implements ListItem
func (SkillItem) GetMetadata ¶
GetMetadata implements ListItem
func (SkillItem) GetSearchText ¶
GetSearchText implements ListItem
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table wraps bubbles.Table with Dracula styling and additional functionality
func ConversationMetadataTable ¶
func ConversationMetadataTable(metadata []ConversationMetadata, width, height int) *Table
ConversationMetadataTable creates a table for displaying conversation metadata
func MCPServerTable ¶
func MCPServerTable(servers []MCPServerInfo, width, height int) *Table
MCPServerTable creates a table for displaying MCP server status
func PluginTable ¶
func PluginTable(plugins []PluginInfo, width, height int) *Table
PluginTable creates a table for displaying plugin status
func ToolResultsTable ¶
func ToolResultsTable(results []ToolResult, width, height int) *Table
ToolResultsTable creates a table for displaying tool execution results
func (*Table) SelectedRow ¶
SelectedRow returns the currently selected row
func (*Table) SetColumns ¶
SetColumns updates the table columns