Documentation
¶
Index ¶
- func CalculateConversationHeight(totalHeight int) int
- func CalculateInputHeight(totalHeight int) int
- func CalculateStatusHeight(totalHeight int) int
- type ApprovalComponent
- type AutocompleteInterface
- type ConversationRenderer
- type DefaultTheme
- func (t *DefaultTheme) GetAccentColor() string
- func (t *DefaultTheme) GetAssistantColor() string
- func (t *DefaultTheme) GetBorderColor() string
- func (t *DefaultTheme) GetDiffAddColor() string
- func (t *DefaultTheme) GetDiffRemoveColor() string
- func (t *DefaultTheme) GetDimColor() string
- func (t *DefaultTheme) GetErrorColor() string
- func (t *DefaultTheme) GetStatusColor() string
- func (t *DefaultTheme) GetSuccessColor() string
- func (t *DefaultTheme) GetUserColor() string
- type HelpBarComponent
- type InputComponent
- type KeyShortcut
- type ScrollDirection
- type SelectionComponent
- type StatusComponent
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateConversationHeight ¶ added in v0.18.1
Layout calculation utilities
func CalculateInputHeight ¶ added in v0.18.1
func CalculateStatusHeight ¶ added in v0.18.1
Types ¶
type ApprovalComponent ¶ added in v0.27.0
type ApprovalComponent interface {
SetWidth(width int)
SetHeight(height int)
Render(toolExecution *domain.ToolExecutionSession, selectedIndex int) string
}
ApprovalComponent interface for approval display
type AutocompleteInterface ¶ added in v0.73.0
type AutocompleteInterface interface {
Update(inputText string, cursorPos int)
HandleKey(key tea.KeyMsg) (bool, string)
IsVisible() bool
SetWidth(width int)
Render() string
GetSelectedShortcut() string
Hide()
}
AutocompleteInterface defines the interface for autocomplete functionality
type ConversationRenderer ¶
type ConversationRenderer interface {
SetConversation([]domain.ConversationEntry)
GetScrollOffset() int
CanScrollUp() bool
CanScrollDown() bool
ToggleToolResultExpansion(index int)
ToggleAllToolResultsExpansion()
IsToolResultExpanded(index int) bool
ToggleRawFormat()
IsRawFormat() bool
ResetUserScroll()
SetWidth(width int)
SetHeight(height int)
Render() string
}
ConversationRenderer interface for conversation display
type DefaultTheme ¶
type DefaultTheme struct{}
DefaultTheme provides a concrete implementation of the Theme interface
func NewDefaultTheme ¶
func NewDefaultTheme() *DefaultTheme
func (*DefaultTheme) GetAccentColor ¶
func (t *DefaultTheme) GetAccentColor() string
func (*DefaultTheme) GetAssistantColor ¶
func (t *DefaultTheme) GetAssistantColor() string
func (*DefaultTheme) GetBorderColor ¶
func (t *DefaultTheme) GetBorderColor() string
func (*DefaultTheme) GetDiffAddColor ¶ added in v0.24.0
func (t *DefaultTheme) GetDiffAddColor() string
func (*DefaultTheme) GetDiffRemoveColor ¶ added in v0.24.0
func (t *DefaultTheme) GetDiffRemoveColor() string
func (*DefaultTheme) GetDimColor ¶
func (t *DefaultTheme) GetDimColor() string
func (*DefaultTheme) GetErrorColor ¶
func (t *DefaultTheme) GetErrorColor() string
func (*DefaultTheme) GetStatusColor ¶
func (t *DefaultTheme) GetStatusColor() string
func (*DefaultTheme) GetSuccessColor ¶ added in v0.56.0
func (t *DefaultTheme) GetSuccessColor() string
func (*DefaultTheme) GetUserColor ¶
func (t *DefaultTheme) GetUserColor() string
type HelpBarComponent ¶ added in v0.15.0
type HelpBarComponent interface {
SetShortcuts(shortcuts []KeyShortcut)
IsEnabled() bool
SetEnabled(enabled bool)
SetWidth(width int)
SetHeight(height int)
Render() string
}
HelpBarComponent interface for help bar
type InputComponent ¶
type InputComponent interface {
GetInput() string
ClearInput()
SetPlaceholder(text string)
GetCursor() int
SetCursor(position int)
SetText(text string)
SetWidth(width int)
SetHeight(height int)
Render() string
HandleKey(key tea.KeyMsg) (tea.Model, tea.Cmd)
CanHandle(key tea.KeyMsg) bool
IsAutocompleteVisible() bool
TryHandleAutocomplete(key tea.KeyMsg) (handled bool, completion string)
AddImageAttachment(image domain.ImageAttachment)
GetImageAttachments() []domain.ImageAttachment
ClearImageAttachments()
AddToHistory(text string) error
SetTextSelectionMode(enabled bool)
IsTextSelectionMode() bool
}
InputComponent interface for input handling
type KeyShortcut ¶ added in v0.15.0
KeyShortcut represents a keyboard shortcut with description
type ScrollDirection ¶
type ScrollDirection int
ScrollDirection represents different scroll directions
const ( ScrollUp ScrollDirection = iota ScrollDown ScrollToTop ScrollToBottom )
type SelectionComponent ¶
type SelectionComponent interface {
GetOptions() []string
SetOptions(options []string)
GetSelected() string
GetSelectedIndex() int
SetSelected(index int)
IsSelected() bool
IsCancelled() bool
SetWidth(width int)
SetHeight(height int)
Render() string
}
SelectionComponent is specific to UI layer (not duplicated in shared)
type StatusComponent ¶
type StatusComponent interface {
ShowStatus(message string)
ShowError(message string)
ShowSpinner(message string)
ClearStatus()
IsShowingError() bool
IsShowingSpinner() bool
SetWidth(width int)
SetHeight(height int)
Render() string
SaveCurrentState()
RestoreSavedState() tea.Cmd
HasSavedState() bool
}
StatusComponent interface for status display
type Theme ¶
type Theme interface {
GetUserColor() string
GetAssistantColor() string
GetErrorColor() string
GetSuccessColor() string
GetStatusColor() string
GetAccentColor() string
GetDimColor() string
GetBorderColor() string
GetDiffAddColor() string
GetDiffRemoveColor() string
}
Theme interface for UI theming
Click to show internal directories.
Click to hide internal directories.