Documentation
¶
Index ¶
- Variables
- func CalculateConversationHeight(totalHeight int) int
- func CalculateInputHeight(totalHeight int) int
- func CalculateStatusHeight(totalHeight int) int
- func FormatDisabled() string
- func FormatEnabled() string
- func FormatError(message string) string
- func FormatErrorCLI(message string) string
- func FormatMessage(msgType MessageType, message string) string
- func FormatResponsiveCodeBlock(code string, terminalWidth int) string
- func FormatResponsiveMessage(message string, terminalWidth int) string
- func FormatSuccess(message string) string
- func FormatWarning(message string) string
- func GetMargins() (top, right, bottom, left int)
- type ApprovalComponent
- type AutocompleteImpl
- func (a *AutocompleteImpl) GetSelectedShortcut() string
- func (a *AutocompleteImpl) HandleKey(key tea.KeyMsg) (bool, string)
- func (a *AutocompleteImpl) Hide()
- func (a *AutocompleteImpl) IsVisible() bool
- func (a *AutocompleteImpl) Render() string
- func (a *AutocompleteImpl) SetToolService(toolService interface{ ... })
- func (a *AutocompleteImpl) SetWidth(width int)
- func (a *AutocompleteImpl) Update(inputText string, cursorPos int)
- 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) GetUserColor() string
- type DraculaTheme
- func (t *DraculaTheme) GetAccentColor() string
- func (t *DraculaTheme) GetAssistantColor() string
- func (t *DraculaTheme) GetBorderColor() string
- func (t *DraculaTheme) GetDiffAddColor() string
- func (t *DraculaTheme) GetDiffRemoveColor() string
- func (t *DraculaTheme) GetDimColor() string
- func (t *DraculaTheme) GetErrorColor() string
- func (t *DraculaTheme) GetStatusColor() string
- func (t *DraculaTheme) GetUserColor() string
- type GithubLightTheme
- func (t *GithubLightTheme) GetAccentColor() string
- func (t *GithubLightTheme) GetAssistantColor() string
- func (t *GithubLightTheme) GetBorderColor() string
- func (t *GithubLightTheme) GetDiffAddColor() string
- func (t *GithubLightTheme) GetDiffRemoveColor() string
- func (t *GithubLightTheme) GetDimColor() string
- func (t *GithubLightTheme) GetErrorColor() string
- func (t *GithubLightTheme) GetStatusColor() string
- func (t *GithubLightTheme) GetUserColor() string
- type HelpBarComponent
- type InputComponent
- func CreateInputView(modelService domain.ModelService, shortcutRegistry *shortcuts.Registry) InputComponent
- func CreateInputViewWithToolService(modelService domain.ModelService, shortcutRegistry *shortcuts.Registry, ...) InputComponent
- func CreateInputViewWithToolServiceAndConfigDir(modelService domain.ModelService, shortcutRegistry *shortcuts.Registry, ...) InputComponent
- type KeyShortcut
- type MessageType
- type SelectionComponent
- type ShortcutOption
- type ShortcutRegistry
- type StatusComponent
- type Theme
- type ThemeProvider
- type TokyoNightTheme
- func (t *TokyoNightTheme) GetAccentColor() string
- func (t *TokyoNightTheme) GetAssistantColor() string
- func (t *TokyoNightTheme) GetBorderColor() string
- func (t *TokyoNightTheme) GetDiffAddColor() string
- func (t *TokyoNightTheme) GetDiffRemoveColor() string
- func (t *TokyoNightTheme) GetDimColor() string
- func (t *TokyoNightTheme) GetErrorColor() string
- func (t *TokyoNightTheme) GetStatusColor() string
- func (t *TokyoNightTheme) GetUserColor() string
Constants ¶
This section is empty.
Variables ¶
var GetResponsiveWidth = shared.GetResponsiveWidth
var WrapText = shared.WrapText
Functions ¶
func CalculateConversationHeight ¶ added in v0.18.2
Layout calculations - simplified without interfaces
func CalculateInputHeight ¶ added in v0.18.2
func CalculateStatusHeight ¶ added in v0.18.2
func FormatDisabled ¶ added in v0.33.4
func FormatDisabled() string
FormatDisabled formats a disabled status
func FormatEnabled ¶ added in v0.33.4
func FormatEnabled() string
FormatEnabled formats an enabled status
func FormatError ¶
FormatError creates a properly formatted error message without duplicate symbols
func FormatErrorCLI ¶
FormatErrorCLI creates an error message with red color for CLI output
func FormatMessage ¶
func FormatMessage(msgType MessageType, message string) string
FormatMessage formats a message with appropriate icons and styling
func FormatResponsiveCodeBlock ¶ added in v0.16.0
FormatResponsiveCodeBlock formats code blocks with responsive width
func FormatResponsiveMessage ¶ added in v0.16.0
func FormatSuccess ¶
FormatSuccess creates a properly formatted success message
func FormatWarning ¶
FormatWarning creates a properly formatted warning message
func GetMargins ¶ added in v0.18.2
func GetMargins() (top, right, bottom, left int)
Types ¶
type ApprovalComponent ¶ added in v0.27.0
type ApprovalComponent = shared.ApprovalComponent
type AutocompleteImpl ¶
type AutocompleteImpl struct {
// contains filtered or unexported fields
}
AutocompleteImpl implements inline autocomplete functionality
func NewAutocomplete ¶
func NewAutocomplete(theme Theme, shortcutRegistry ShortcutRegistry) *AutocompleteImpl
NewAutocomplete creates a new autocomplete component
func (*AutocompleteImpl) GetSelectedShortcut ¶ added in v0.42.0
func (a *AutocompleteImpl) GetSelectedShortcut() string
GetSelectedShortcut returns the currently selected shortcut
func (*AutocompleteImpl) HandleKey ¶
func (a *AutocompleteImpl) HandleKey(key tea.KeyMsg) (bool, string)
HandleKey processes key input for autocomplete navigation
func (*AutocompleteImpl) IsVisible ¶
func (a *AutocompleteImpl) IsVisible() bool
IsVisible returns whether autocomplete is currently visible
func (*AutocompleteImpl) Render ¶
func (a *AutocompleteImpl) Render() string
Render returns the autocomplete suggestions as a string
func (*AutocompleteImpl) SetToolService ¶ added in v0.32.0
func (a *AutocompleteImpl) SetToolService(toolService interface { ListAvailableTools() []string ListTools() []sdk.ChatCompletionTool })
SetToolService sets the tool service for tool autocomplete
func (*AutocompleteImpl) SetWidth ¶
func (a *AutocompleteImpl) SetWidth(width int)
SetWidth sets the width for rendering
func (*AutocompleteImpl) Update ¶
func (a *AutocompleteImpl) Update(inputText string, cursorPos int)
Update handles autocomplete logic
type ConversationRenderer ¶
type ConversationRenderer = shared.ConversationRenderer
func CreateConversationView ¶ added in v0.18.2
func CreateConversationView(themeService domain.ThemeService) ConversationRenderer
CreateConversationView creates a new conversation view component
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.1
func (t *DefaultTheme) GetDiffAddColor() string
func (*DefaultTheme) GetDiffRemoveColor ¶ added in v0.24.1
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) GetUserColor ¶
func (t *DefaultTheme) GetUserColor() string
type DraculaTheme ¶ added in v0.48.0
type DraculaTheme struct{}
DraculaTheme provides the popular Dracula color scheme
func NewDraculaTheme ¶ added in v0.48.0
func NewDraculaTheme() *DraculaTheme
func (*DraculaTheme) GetAccentColor ¶ added in v0.48.0
func (t *DraculaTheme) GetAccentColor() string
func (*DraculaTheme) GetAssistantColor ¶ added in v0.48.0
func (t *DraculaTheme) GetAssistantColor() string
func (*DraculaTheme) GetBorderColor ¶ added in v0.48.0
func (t *DraculaTheme) GetBorderColor() string
func (*DraculaTheme) GetDiffAddColor ¶ added in v0.48.0
func (t *DraculaTheme) GetDiffAddColor() string
func (*DraculaTheme) GetDiffRemoveColor ¶ added in v0.48.0
func (t *DraculaTheme) GetDiffRemoveColor() string
func (*DraculaTheme) GetDimColor ¶ added in v0.48.0
func (t *DraculaTheme) GetDimColor() string
func (*DraculaTheme) GetErrorColor ¶ added in v0.48.0
func (t *DraculaTheme) GetErrorColor() string
func (*DraculaTheme) GetStatusColor ¶ added in v0.48.0
func (t *DraculaTheme) GetStatusColor() string
func (*DraculaTheme) GetUserColor ¶ added in v0.48.0
func (t *DraculaTheme) GetUserColor() string
type GithubLightTheme ¶ added in v0.48.0
type GithubLightTheme struct{}
GithubLightTheme provides a light theme similar to GitHub's interface
func NewGithubLightTheme ¶ added in v0.48.0
func NewGithubLightTheme() *GithubLightTheme
func (*GithubLightTheme) GetAccentColor ¶ added in v0.48.0
func (t *GithubLightTheme) GetAccentColor() string
func (*GithubLightTheme) GetAssistantColor ¶ added in v0.48.0
func (t *GithubLightTheme) GetAssistantColor() string
func (*GithubLightTheme) GetBorderColor ¶ added in v0.48.0
func (t *GithubLightTheme) GetBorderColor() string
func (*GithubLightTheme) GetDiffAddColor ¶ added in v0.48.0
func (t *GithubLightTheme) GetDiffAddColor() string
func (*GithubLightTheme) GetDiffRemoveColor ¶ added in v0.48.0
func (t *GithubLightTheme) GetDiffRemoveColor() string
func (*GithubLightTheme) GetDimColor ¶ added in v0.48.0
func (t *GithubLightTheme) GetDimColor() string
func (*GithubLightTheme) GetErrorColor ¶ added in v0.48.0
func (t *GithubLightTheme) GetErrorColor() string
func (*GithubLightTheme) GetStatusColor ¶ added in v0.48.0
func (t *GithubLightTheme) GetStatusColor() string
func (*GithubLightTheme) GetUserColor ¶ added in v0.48.0
func (t *GithubLightTheme) GetUserColor() string
type HelpBarComponent ¶ added in v0.16.0
type HelpBarComponent = shared.HelpBarComponent
func CreateHelpBar ¶ added in v0.18.2
func CreateHelpBar(themeService domain.ThemeService) HelpBarComponent
CreateHelpBar creates a new help bar component
type InputComponent ¶
type InputComponent = shared.InputComponent
func CreateInputView ¶ added in v0.18.2
func CreateInputView(modelService domain.ModelService, shortcutRegistry *shortcuts.Registry) InputComponent
CreateInputView creates a new input view component
func CreateInputViewWithToolService ¶ added in v0.32.0
func CreateInputViewWithToolService(modelService domain.ModelService, shortcutRegistry *shortcuts.Registry, toolService domain.ToolService) InputComponent
CreateInputViewWithToolService creates a new input view component with tool service
func CreateInputViewWithToolServiceAndConfigDir ¶ added in v0.42.0
func CreateInputViewWithToolServiceAndConfigDir(modelService domain.ModelService, shortcutRegistry *shortcuts.Registry, toolService domain.ToolService, configDir string) InputComponent
CreateInputViewWithToolServiceAndConfigDir creates a new input view component with tool service and config directory
type KeyShortcut ¶ added in v0.16.0
type KeyShortcut = shared.KeyShortcut
Type aliases to shared interfaces to avoid duplication
type MessageType ¶
type MessageType int
MessageType represents different types of messages
const ( MessageSuccess MessageType = iota MessageError MessageWarning MessageInfo MessageProgress )
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 ShortcutOption ¶ added in v0.42.0
ShortcutOption represents a shortcut option for autocomplete
type ShortcutRegistry ¶ added in v0.42.0
ShortcutRegistry interface for dependency injection
type StatusComponent ¶
type StatusComponent = shared.StatusComponent
func CreateStatusView ¶ added in v0.18.2
func CreateStatusView(themeService domain.ThemeService) StatusComponent
CreateStatusView creates a new status view component
type ThemeProvider ¶ added in v0.48.0
type ThemeProvider struct {
// contains filtered or unexported fields
}
ThemeProvider manages available themes
func NewThemeProvider ¶ added in v0.48.0
func NewThemeProvider() *ThemeProvider
NewThemeProvider creates a new theme provider with default themes
func (*ThemeProvider) GetCurrentTheme ¶ added in v0.48.0
func (tp *ThemeProvider) GetCurrentTheme() shared.Theme
GetCurrentTheme returns the currently active theme
func (*ThemeProvider) GetCurrentThemeName ¶ added in v0.48.0
func (tp *ThemeProvider) GetCurrentThemeName() string
GetCurrentThemeName returns the name of the currently active theme
func (*ThemeProvider) GetTheme ¶ added in v0.48.0
func (tp *ThemeProvider) GetTheme(name string) (shared.Theme, error)
GetTheme returns the theme by name, or the current theme if name is empty
func (*ThemeProvider) ListThemes ¶ added in v0.48.0
func (tp *ThemeProvider) ListThemes() []string
ListThemes returns all available theme names in consistent order
func (*ThemeProvider) SetCurrentTheme ¶ added in v0.48.0
func (tp *ThemeProvider) SetCurrentTheme(name string) error
SetCurrentTheme sets the current theme by name
type TokyoNightTheme ¶ added in v0.48.0
type TokyoNightTheme struct{}
TokyoNightTheme is the default theme (same as DefaultTheme)
func NewTokyoNightTheme ¶ added in v0.48.0
func NewTokyoNightTheme() *TokyoNightTheme
func (*TokyoNightTheme) GetAccentColor ¶ added in v0.48.0
func (t *TokyoNightTheme) GetAccentColor() string
func (*TokyoNightTheme) GetAssistantColor ¶ added in v0.48.0
func (t *TokyoNightTheme) GetAssistantColor() string
func (*TokyoNightTheme) GetBorderColor ¶ added in v0.48.0
func (t *TokyoNightTheme) GetBorderColor() string
func (*TokyoNightTheme) GetDiffAddColor ¶ added in v0.48.0
func (t *TokyoNightTheme) GetDiffAddColor() string
func (*TokyoNightTheme) GetDiffRemoveColor ¶ added in v0.48.0
func (t *TokyoNightTheme) GetDiffRemoveColor() string
func (*TokyoNightTheme) GetDimColor ¶ added in v0.48.0
func (t *TokyoNightTheme) GetDimColor() string
func (*TokyoNightTheme) GetErrorColor ¶ added in v0.48.0
func (t *TokyoNightTheme) GetErrorColor() string
func (*TokyoNightTheme) GetStatusColor ¶ added in v0.48.0
func (t *TokyoNightTheme) GetStatusColor() string
func (*TokyoNightTheme) GetUserColor ¶ added in v0.48.0
func (t *TokyoNightTheme) GetUserColor() string