Documentation
¶
Index ¶
- type BaseCommand
- func (c *BaseCommand) GetAliases() []string
- func (c *BaseCommand) GetCategory() string
- func (c *BaseCommand) GetDescription() string
- func (c *BaseCommand) GetExamples() []string
- func (c *BaseCommand) GetName() string
- func (c *BaseCommand) GetShortcuts() []string
- func (c *BaseCommand) GetUsage() string
- func (c *BaseCommand) IsHidden() bool
- type ClearCommand
- type Command
- type CommandFunc
- type CommandHandler
- func (h *CommandHandler) GetAvailableCommands() []string
- func (h *CommandHandler) GetCommand(name string) *CommandWrapper
- func (h *CommandHandler) GetRegistry() *CommandRegistry
- func (h *CommandHandler) HandleCommand(command string, args []string) error
- func (h *CommandHandler) RegisterAlias(alias, command string)
- func (h *CommandHandler) RegisterCommand(name string, fn CommandFunc)
- func (h *CommandHandler) RegisterNewCommand(cmd Command)
- type CommandRegistry
- func (r *CommandRegistry) GetAliases(commandName string) []string
- func (r *CommandRegistry) GetAllCommands() []*CommandWrapper
- func (r *CommandRegistry) GetCategories() []string
- func (r *CommandRegistry) GetCommand(name string) *CommandWrapper
- func (r *CommandRegistry) GetCommandNames() []string
- func (r *CommandRegistry) GetCommandsByCategory() map[string][]*CommandWrapper
- func (r *CommandRegistry) RegisterNewCommand(cmd Command)
- func (r *CommandRegistry) SearchCommands(query string) []*CommandWrapper
- type CommandWrapper
- func (w *CommandWrapper) Execute(args []string) error
- func (w *CommandWrapper) GetAliases() []string
- func (w *CommandWrapper) GetCategory() string
- func (w *CommandWrapper) GetDescription() string
- func (w *CommandWrapper) GetExamples() []string
- func (w *CommandWrapper) GetName() string
- func (w *CommandWrapper) GetUsage() string
- func (w *CommandWrapper) IsHidden() bool
- type ConfigCommand
- type ContextCommand
- type DebugCommand
- type DebugControllerInterface
- type ExitCommand
- type HelpCommand
- type StatusCommand
- type ThemeCommand
- type UpdateCommand
- func (c *UpdateCommand) AutoComplete(args []string) []string
- func (c *UpdateCommand) Execute(args []string) error
- func (c *UpdateCommand) GetAliases() []string
- func (c *UpdateCommand) GetCategory() string
- func (c *UpdateCommand) GetDescription() string
- func (c *UpdateCommand) GetExamples() []string
- func (c *UpdateCommand) GetName() string
- func (c *UpdateCommand) GetShortcuts() []string
- func (c *UpdateCommand) GetSubcommandDescription(subcommand string) string
- func (c *UpdateCommand) GetSubcommands() []string
- func (c *UpdateCommand) GetUsage() string
- func (c *UpdateCommand) IsHidden() bool
- func (c *UpdateCommand) SupportsAutoComplete() bool
- type WriteCommand
- type YankCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseCommand ¶
type BaseCommand struct {
Name string
Description string
Usage string
Examples []string
Aliases []string
Category string
Hidden bool
Shortcuts []string
}
BaseCommand provides common functionality for all commands
func (*BaseCommand) GetAliases ¶
func (c *BaseCommand) GetAliases() []string
func (*BaseCommand) GetCategory ¶
func (c *BaseCommand) GetCategory() string
func (*BaseCommand) GetDescription ¶
func (c *BaseCommand) GetDescription() string
func (*BaseCommand) GetExamples ¶
func (c *BaseCommand) GetExamples() []string
func (*BaseCommand) GetName ¶
func (c *BaseCommand) GetName() string
func (*BaseCommand) GetShortcuts ¶
func (c *BaseCommand) GetShortcuts() []string
func (*BaseCommand) GetUsage ¶
func (c *BaseCommand) GetUsage() string
func (*BaseCommand) IsHidden ¶
func (c *BaseCommand) IsHidden() bool
type ClearCommand ¶
type ClearCommand struct {
BaseCommand
// contains filtered or unexported fields
}
func NewClearCommand ¶
func NewClearCommand(controller *controllers.ChatController) *ClearCommand
func (*ClearCommand) Execute ¶
func (c *ClearCommand) Execute(args []string) error
type Command ¶
type Command interface {
// Metadata
GetName() string
GetDescription() string
GetUsage() string
GetExamples() []string
GetAliases() []string
GetCategory() string
IsHidden() bool
GetShortcuts() []string
// Execution
Execute(args []string) error
}
Command represents a command that can be executed
type CommandFunc ¶
type CommandHandler ¶
type CommandHandler struct {
// contains filtered or unexported fields
}
func NewCommandHandler ¶
func NewCommandHandler(commandEventBus *events.CommandEventBus, notification types.Notification, registry *CommandRegistry) *CommandHandler
func (*CommandHandler) GetAvailableCommands ¶
func (h *CommandHandler) GetAvailableCommands() []string
func (*CommandHandler) GetCommand ¶
func (h *CommandHandler) GetCommand(name string) *CommandWrapper
GetCommand returns a command by name or alias
func (*CommandHandler) GetRegistry ¶
func (h *CommandHandler) GetRegistry() *CommandRegistry
GetRegistry returns the command registry
func (*CommandHandler) HandleCommand ¶
func (h *CommandHandler) HandleCommand(command string, args []string) error
func (*CommandHandler) RegisterAlias ¶
func (h *CommandHandler) RegisterAlias(alias, command string)
RegisterAlias registers an alias (legacy method for backward compatibility)
func (*CommandHandler) RegisterCommand ¶
func (h *CommandHandler) RegisterCommand(name string, fn CommandFunc)
RegisterCommand registers a command (legacy method for backward compatibility)
func (*CommandHandler) RegisterNewCommand ¶
func (h *CommandHandler) RegisterNewCommand(cmd Command)
RegisterNewCommand registers a new command interface
type CommandRegistry ¶
type CommandRegistry struct {
// contains filtered or unexported fields
}
CommandRegistry manages command registration and metadata
func NewCommandRegistry ¶
func NewCommandRegistry() *CommandRegistry
NewCommandRegistry creates a new command registry
func (*CommandRegistry) GetAliases ¶
func (r *CommandRegistry) GetAliases(commandName string) []string
GetAliases returns all aliases for a command
func (*CommandRegistry) GetAllCommands ¶
func (r *CommandRegistry) GetAllCommands() []*CommandWrapper
GetAllCommands returns all registered commands (excluding hidden)
func (*CommandRegistry) GetCategories ¶
func (r *CommandRegistry) GetCategories() []string
GetCategories returns all category names
func (*CommandRegistry) GetCommand ¶
func (r *CommandRegistry) GetCommand(name string) *CommandWrapper
GetCommand returns a command by name or alias
func (*CommandRegistry) GetCommandNames ¶
func (r *CommandRegistry) GetCommandNames() []string
GetCommandNames returns all command names (including aliases)
func (*CommandRegistry) GetCommandsByCategory ¶
func (r *CommandRegistry) GetCommandsByCategory() map[string][]*CommandWrapper
GetCommandsByCategory returns commands grouped by category
func (*CommandRegistry) RegisterNewCommand ¶
func (r *CommandRegistry) RegisterNewCommand(cmd Command)
RegisterNewCommand adds a new command interface to the registry
func (*CommandRegistry) SearchCommands ¶
func (r *CommandRegistry) SearchCommands(query string) []*CommandWrapper
SearchCommands finds commands matching the query in name or description
type CommandWrapper ¶
type CommandWrapper struct {
NewCommand Command // New command interface
}
CommandWrapper wraps both old and new command types
func (*CommandWrapper) Execute ¶
func (w *CommandWrapper) Execute(args []string) error
func (*CommandWrapper) GetAliases ¶
func (w *CommandWrapper) GetAliases() []string
func (*CommandWrapper) GetCategory ¶
func (w *CommandWrapper) GetCategory() string
func (*CommandWrapper) GetDescription ¶
func (w *CommandWrapper) GetDescription() string
func (*CommandWrapper) GetExamples ¶
func (w *CommandWrapper) GetExamples() []string
func (*CommandWrapper) GetName ¶
func (w *CommandWrapper) GetName() string
func (*CommandWrapper) GetUsage ¶
func (w *CommandWrapper) GetUsage() string
func (*CommandWrapper) IsHidden ¶
func (w *CommandWrapper) IsHidden() bool
type ConfigCommand ¶
type ConfigCommand struct {
BaseCommand
// contains filtered or unexported fields
}
func NewConfigCommand ¶
func NewConfigCommand(configManager *helpers.ConfigManager, commandEventBus *events.CommandEventBus, guiCommon types.Gui, notification *controllers.ChatController) *ConfigCommand
func (*ConfigCommand) Execute ¶
func (c *ConfigCommand) Execute(args []string) error
type ContextCommand ¶
type ContextCommand struct {
BaseCommand
// contains filtered or unexported fields
}
func NewContextCommand ¶
func NewContextCommand(controller *controllers.LLMContextController) *ContextCommand
func (*ContextCommand) Execute ¶
func (c *ContextCommand) Execute(args []string) error
type DebugCommand ¶
type DebugCommand struct {
BaseCommand
// contains filtered or unexported fields
}
func NewDebugCommand ¶
func NewDebugCommand(controller *controllers.DebugController, notification *controllers.ChatController) *DebugCommand
func (*DebugCommand) Execute ¶
func (c *DebugCommand) Execute(args []string) error
type DebugControllerInterface ¶
type DebugControllerInterface interface {
AddDebugMessage(message string)
ClearDebugMessages()
GetDebugMessages() []string
IsDebugMode() bool
SetDebugMode(enabled bool)
}
DebugControllerInterface interface for debug functionality
type ExitCommand ¶
type ExitCommand struct {
BaseCommand
// contains filtered or unexported fields
}
func NewExitCommand ¶
func NewExitCommand(commandEventBus *events.CommandEventBus) *ExitCommand
func (*ExitCommand) Execute ¶
func (c *ExitCommand) Execute(args []string) error
type HelpCommand ¶
type HelpCommand struct {
BaseCommand
// contains filtered or unexported fields
}
func NewHelpCommand ¶
func NewHelpCommand(helpController controllers.HelpControllerInterface) *HelpCommand
func (*HelpCommand) Execute ¶
func (c *HelpCommand) Execute(args []string) error
type StatusCommand ¶
type StatusCommand struct {
BaseCommand
// contains filtered or unexported fields
}
func NewStatusCommand ¶
func NewStatusCommand(notification types.Notification, genieService genie.Genie) *StatusCommand
func (*StatusCommand) Execute ¶
func (c *StatusCommand) Execute(args []string) error
type ThemeCommand ¶
type ThemeCommand struct {
BaseCommand
// contains filtered or unexported fields
}
func NewThemeCommand ¶
func NewThemeCommand(configManager *helpers.ConfigManager, commandEventBus *events.CommandEventBus, notification *controllers.ChatController) *ThemeCommand
func (*ThemeCommand) Execute ¶
func (c *ThemeCommand) Execute(args []string) error
type UpdateCommand ¶ added in v0.1.6
type UpdateCommand struct {
// contains filtered or unexported fields
}
UpdateCommand handles update-related operations in the TUI
func NewUpdateCommand ¶ added in v0.1.6
func NewUpdateCommand(notification types.Notification) *UpdateCommand
NewUpdateCommand creates a new update command
func (*UpdateCommand) AutoComplete ¶ added in v0.1.6
func (c *UpdateCommand) AutoComplete(args []string) []string
AutoComplete provides autocompletion suggestions
func (*UpdateCommand) Execute ¶ added in v0.1.6
func (c *UpdateCommand) Execute(args []string) error
Execute executes the update command
func (*UpdateCommand) GetAliases ¶ added in v0.1.6
func (c *UpdateCommand) GetAliases() []string
GetAliases returns command aliases
func (*UpdateCommand) GetCategory ¶ added in v0.1.6
func (c *UpdateCommand) GetCategory() string
GetCategory returns the command category
func (*UpdateCommand) GetDescription ¶ added in v0.1.6
func (c *UpdateCommand) GetDescription() string
GetDescription returns the command description
func (*UpdateCommand) GetExamples ¶ added in v0.1.6
func (c *UpdateCommand) GetExamples() []string
GetExamples returns command examples
func (*UpdateCommand) GetName ¶ added in v0.1.6
func (c *UpdateCommand) GetName() string
GetName returns the command name
func (*UpdateCommand) GetShortcuts ¶ added in v0.1.6
func (c *UpdateCommand) GetShortcuts() []string
GetShortcuts returns keyboard shortcuts for the command
func (*UpdateCommand) GetSubcommandDescription ¶ added in v0.1.6
func (c *UpdateCommand) GetSubcommandDescription(subcommand string) string
GetSubcommandDescription returns description for a subcommand
func (*UpdateCommand) GetSubcommands ¶ added in v0.1.6
func (c *UpdateCommand) GetSubcommands() []string
GetSubcommands returns available subcommands
func (*UpdateCommand) GetUsage ¶ added in v0.1.6
func (c *UpdateCommand) GetUsage() string
GetUsage returns the command usage
func (*UpdateCommand) IsHidden ¶ added in v0.1.6
func (c *UpdateCommand) IsHidden() bool
IsHidden returns whether the command is hidden
func (*UpdateCommand) SupportsAutoComplete ¶ added in v0.1.6
func (c *UpdateCommand) SupportsAutoComplete() bool
SupportsAutoComplete returns true if the command supports autocompletion
type WriteCommand ¶
type WriteCommand struct {
BaseCommand
// contains filtered or unexported fields
}
func NewWriteCommand ¶
func NewWriteCommand(controller *controllers.WriteController) *WriteCommand
func (*WriteCommand) Execute ¶
func (c *WriteCommand) Execute(args []string) error
type YankCommand ¶
type YankCommand struct {
BaseCommand
// contains filtered or unexported fields
}
func NewYankCommand ¶
func NewYankCommand(chatState *state.ChatState, clipboardHelper *helpers.Clipboard, notification *controllers.ChatController) *YankCommand
func (*YankCommand) Execute ¶
func (c *YankCommand) Execute(args []string) error