Documentation
¶
Index ¶
- type BaseController
- type ChatController
- type ConfirmationKeyHandler
- type DebugController
- type HelpController
- type HelpControllerInterface
- type HelpRenderer
- type LLMContextController
- func (c *LLMContextController) Close() error
- func (c *LLMContextController) GetContextData() map[string]string
- func (c *LLMContextController) HandleComponentEvent(eventName string, data interface{}) error
- func (c *LLMContextController) RefreshContext() error
- func (c *LLMContextController) Show() error
- type SlashCommandController
- type ToolConfirmationController
- func (tc *ToolConfirmationController) HandleKeyPress(key interface{}) (bool, error)
- func (tc *ToolConfirmationController) HandleToolConfirmationRequest(event core_events.ToolConfirmationRequest) error
- func (tc *ToolConfirmationController) HandleToolConfirmationResponse(executionID string, confirmed bool) error
- type UserConfirmationController
- func (uc *UserConfirmationController) GetConfirmationQueueStatus() (int, bool)
- func (uc *UserConfirmationController) HandleKeyPress(key interface{}) (bool, error)
- func (uc *UserConfirmationController) HandleUserConfirmationRequest(event core_events.UserConfirmationRequest) error
- func (uc *UserConfirmationController) HandleUserConfirmationResponse(executionID string, confirmed bool) error
- type WriteController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseController ¶
type BaseController struct {
// contains filtered or unexported fields
}
func NewBaseController ¶
func NewBaseController(ctx types.Component, gui types.Gui, configManager *helpers.ConfigManager) *BaseController
func (*BaseController) GetComponent ¶
func (c *BaseController) GetComponent() types.Component
func (*BaseController) GetConfig ¶
func (c *BaseController) GetConfig() *types.Config
GetConfig returns the current config from ConfigManager
func (*BaseController) GetConfigManager ¶
func (c *BaseController) GetConfigManager() *helpers.ConfigManager
GetConfigManager returns the ConfigManager for direct access
func (*BaseController) GetTheme ¶
func (c *BaseController) GetTheme() *types.Theme
GetTheme returns the current theme from ConfigManager
func (*BaseController) PostUIUpdate ¶
func (c *BaseController) PostUIUpdate(fn func())
type ChatController ¶
type ChatController struct {
*BaseController
// contains filtered or unexported fields
}
func NewChatController ¶
func NewChatController( ctx types.Component, gui types.Gui, genieService genie.Genie, state types.IStateAccessor, configManager *helpers.ConfigManager, commandEventBus *events.CommandEventBus, ) *ChatController
func (*ChatController) AddErrorMessage ¶
func (c *ChatController) AddErrorMessage(message string)
func (*ChatController) AddSystemMessage ¶
func (c *ChatController) AddSystemMessage(message string)
func (*ChatController) CancelChat ¶
func (c *ChatController) CancelChat()
func (*ChatController) ClearConversation ¶
func (c *ChatController) ClearConversation() error
func (*ChatController) GetConversationHistory ¶
func (c *ChatController) GetConversationHistory() []types.Message
type ConfirmationKeyHandler ¶
type ConfirmationKeyHandler struct{}
ConfirmationKeyHandler provides common key interpretation logic for confirmation dialogs
func NewConfirmationKeyHandler ¶
func NewConfirmationKeyHandler() *ConfirmationKeyHandler
NewConfirmationKeyHandler creates a new confirmation key handler
func (*ConfirmationKeyHandler) InterpretKey ¶
func (c *ConfirmationKeyHandler) InterpretKey(key interface{}) (confirmed bool, handled bool)
InterpretKey determines if a key press is a confirmation response Returns (confirmed, handled) where: - confirmed: true for "yes" keys, false for "no" keys - handled: true if the key was recognized as a confirmation key, false otherwise
type DebugController ¶
type DebugController struct {
*BaseController
// contains filtered or unexported fields
}
func NewDebugController ¶
func NewDebugController( genieService genie.Genie, gui types.Gui, debugState *state.DebugState, debugComponent *component.DebugComponent, layoutManager *layout.LayoutManager, clipboard *helpers.Clipboard, config *helpers.ConfigManager, commandEventBus *events.CommandEventBus, ) *DebugController
func (*DebugController) AddDebugMessage ¶
func (c *DebugController) AddDebugMessage(message string)
AddDebugMessage adds a debug message and notifies component
func (*DebugController) ClearDebugMessages ¶
func (c *DebugController) ClearDebugMessages()
ClearDebugMessages clears all debug messages and triggers render
func (*DebugController) CopyDebugMessages ¶
func (c *DebugController) CopyDebugMessages()
CopyDebugMessages copy all debug messages to clipboard
func (*DebugController) GetDebugMessages ¶
func (c *DebugController) GetDebugMessages() []string
GetDebugMessages returns all debug messages
func (*DebugController) UpdateLogLevel ¶ added in v0.1.6
func (c *DebugController) UpdateLogLevel(levelStr string)
UpdateLogLevel updates the global logger's level based on the provided level string
type HelpController ¶
type HelpController struct {
*BaseController
// contains filtered or unexported fields
}
HelpController manages help display functionality
func NewHelpController ¶
func NewHelpController( gui types.Gui, layoutManager *layout.LayoutManager, textViewerComponent *component.TextViewerComponent, helpRenderer HelpRenderer, configManager *helpers.ConfigManager, ) *HelpController
NewHelpController creates a new help controller
func (*HelpController) IsVisible ¶
func (c *HelpController) IsVisible() bool
IsVisible returns whether help is currently visible
func (*HelpController) RefreshHelp ¶
func (c *HelpController) RefreshHelp() error
RefreshHelp clears the cached help text and regenerates it
func (*HelpController) ShowHelp ¶
func (c *HelpController) ShowHelp() error
ShowHelp displays help content in the text viewer panel
func (*HelpController) ShowSlashCommandsHelp ¶ added in v0.1.6
func (c *HelpController) ShowSlashCommandsHelp() error
ShowSlashCommandsHelp displays slash commands help in the text viewer panel
func (*HelpController) ToggleHelp ¶
func (c *HelpController) ToggleHelp() error
ToggleHelp toggles help visibility
type HelpControllerInterface ¶
type HelpControllerInterface interface {
ShowHelp() error
ShowSlashCommandsHelp() error
ToggleHelp() error
IsVisible() bool
}
HelpControllerInterface defines the interface for help operations
type HelpRenderer ¶
HelpRenderer interface for generating help content
type LLMContextController ¶
type LLMContextController struct {
*BaseController
// contains filtered or unexported fields
}
func NewLLMContextController ¶
func NewLLMContextController( gui types.Gui, genieService genie.Genie, layoutManager *layout.LayoutManager, state types.IStateAccessor, configManager *helpers.ConfigManager, commandEventBus *events.CommandEventBus, ) *LLMContextController
func (*LLMContextController) Close ¶
func (c *LLMContextController) Close() error
Close hides the context viewer
func (*LLMContextController) GetContextData ¶
func (c *LLMContextController) GetContextData() map[string]string
GetContextData returns the current context data (called by component)
func (*LLMContextController) HandleComponentEvent ¶
func (c *LLMContextController) HandleComponentEvent(eventName string, data interface{}) error
HandleComponentEvent processes events from the component
func (*LLMContextController) RefreshContext ¶
func (c *LLMContextController) RefreshContext() error
RefreshContext reloads the context data from Genie
func (*LLMContextController) Show ¶
func (c *LLMContextController) Show() error
Show displays the context viewer
type SlashCommandController ¶ added in v0.1.6
type SlashCommandController struct {
// contains filtered or unexported fields
}
func NewSlashCommandController ¶ added in v0.1.6
func NewSlashCommandController(commandEventBus *events.CommandEventBus, slashCommandManager *slashcommands.Manager, notification types.Notification) *SlashCommandController
func (*SlashCommandController) HandleSlashCommand ¶ added in v0.1.6
func (s *SlashCommandController) HandleSlashCommand(rawCommand string)
type ToolConfirmationController ¶
type ToolConfirmationController struct {
*ConfirmationKeyHandler
ConfirmationComponent *component.ConfirmationComponent
// contains filtered or unexported fields
}
func NewToolConfirmationController ¶
func NewToolConfirmationController( gui types.Gui, stateAccessor types.IStateAccessor, layoutManager *layout.LayoutManager, inputComponent types.Component, configManager *helpers.ConfigManager, eventBus core_events.EventBus, commandEventBus *events.CommandEventBus, ) *ToolConfirmationController
func (*ToolConfirmationController) HandleKeyPress ¶
func (tc *ToolConfirmationController) HandleKeyPress(key interface{}) (bool, error)
HandleKeyPress processes a key press and determines if it's a confirmation response
func (*ToolConfirmationController) HandleToolConfirmationRequest ¶
func (tc *ToolConfirmationController) HandleToolConfirmationRequest(event core_events.ToolConfirmationRequest) error
func (*ToolConfirmationController) HandleToolConfirmationResponse ¶
func (tc *ToolConfirmationController) HandleToolConfirmationResponse(executionID string, confirmed bool) error
type UserConfirmationController ¶
type UserConfirmationController struct {
*ConfirmationKeyHandler
ConfirmationComponent *component.ConfirmationComponent
// contains filtered or unexported fields
}
func NewUserConfirmationController ¶
func NewUserConfirmationController( gui types.Gui, stateAccessor types.IStateAccessor, layoutManager *layout.LayoutManager, inputComponent types.Component, diffViewerComponent *component.DiffViewerComponent, configManager *helpers.ConfigManager, eventBus core_events.EventBus, commandEventBus *events.CommandEventBus, ) *UserConfirmationController
func (*UserConfirmationController) GetConfirmationQueueStatus ¶
func (uc *UserConfirmationController) GetConfirmationQueueStatus() (int, bool)
GetConfirmationQueueStatus returns information about pending confirmations
func (*UserConfirmationController) HandleKeyPress ¶
func (uc *UserConfirmationController) HandleKeyPress(key interface{}) (bool, error)
HandleKeyPress processes a key press and determines if it's a confirmation response
func (*UserConfirmationController) HandleUserConfirmationRequest ¶
func (uc *UserConfirmationController) HandleUserConfirmationRequest(event core_events.UserConfirmationRequest) error
func (*UserConfirmationController) HandleUserConfirmationResponse ¶
func (uc *UserConfirmationController) HandleUserConfirmationResponse(executionID string, confirmed bool) error
type WriteController ¶
type WriteController struct {
// contains filtered or unexported fields
}
func NewWriteController ¶
func NewWriteController( gui types.Gui, configManager *helpers.ConfigManager, commandEventBus *events.CommandEventBus, layoutManager *layout.LayoutManager, ) *WriteController
func (*WriteController) Close ¶
func (c *WriteController) Close() error
func (*WriteController) Show ¶
func (c *WriteController) Show() error
func (*WriteController) ShowWithContent ¶
func (c *WriteController) ShowWithContent(initialContent string) error