Documentation
¶
Index ¶
- Variables
- func NewGocuiGui(configManager *helpers.ConfigManager) (*gocui.Gui, error)
- func NewGocuiGuiWithOutputMode(outputMode gocui.OutputMode) (*gocui.Gui, error)
- func ProvideChatController(messagesComponent *component.MessagesComponent, gui types.Gui, ...) (*controllers.ChatController, error)
- func ProvideChatState(configManager *helpers.ConfigManager) *state.ChatState
- func ProvideClearCommand(chatController *controllers.ChatController) *commands.ClearCommand
- func ProvideClipboard() *helpers.Clipboard
- func ProvideCommandEventBus() *events.CommandEventBus
- func ProvideCommandHandler(commandEventBus2 *events.CommandEventBus, ...) *commands.CommandHandler
- func ProvideCommandRegistry() *commands.CommandRegistry
- func ProvideCommandSuggester(registry *commands.CommandRegistry) *shell.CommandSuggester
- func ProvideConfigCommand(configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus, ...) *commands.ConfigCommand
- func ProvideConfigManager() (*helpers.ConfigManager, error)
- func ProvideContextCommand(llmContextController *controllers.LLMContextController) *commands.ContextCommand
- func ProvideDebugCommand(debugController *controllers.DebugController, ...) *commands.DebugCommand
- func ProvideDebugComponent(gui types.Gui, debugState *state.DebugState, ...) (*component.DebugComponent, error)
- func ProvideDebugController(genieService genie.Genie, gui types.Gui, debugState *state.DebugState, ...) (*controllers.DebugController, error)
- func ProvideDebugState() *state.DebugState
- func ProvideDiffViewerComponent(gui types.Gui, configManager *helpers.ConfigManager, ...) (*component.DiffViewerComponent, error)
- func ProvideEventBus(genieService genie.Genie) events2.EventBus
- func ProvideExitCommand(commandEventBus2 *events.CommandEventBus) *commands.ExitCommand
- func ProvideGenie() (genie.Genie, error)
- func ProvideGlobalLogger() logging.Logger
- func ProvideGui(gui *gocui.Gui) types.Gui
- func ProvideHistoryPathString(historyPath HistoryPath) string
- func ProvideInputComponent(gui types.Gui, configManager *helpers.ConfigManager, ...) (*component.InputComponent, error)
- func ProvideLLMContextController(gui types.Gui, genieService genie.Genie, layoutManager *layout.LayoutManager, ...) (*controllers.LLMContextController, error)
- func ProvideLayoutManager(layoutBuilder *LayoutBuilder) *layout.LayoutManager
- func ProvideMessagesComponent(gui types.Gui, chatState *state.ChatState, ...) (*component.MessagesComponent, error)
- func ProvideSlashCommandController(commandEventBus2 *events.CommandEventBus, ...) *controllers.SlashCommandController
- func ProvideSlashCommandManager() *slashcommands.Manager
- func ProvideSlashCommandSuggester(manager *slashcommands.Manager) *shell.SlashCommandSuggester
- func ProvideStateAccessor(chatState *state.ChatState, uiState *state.UIState) *state.StateAccessor
- func ProvideStatusCommand(chatController *controllers.ChatController, genieService genie.Genie) *commands.StatusCommand
- func ProvideStatusComponent(gui types.Gui, stateAccessor *state.StateAccessor, ...) (*component.StatusComponent, error)
- func ProvideTextViewerComponent(gui types.Gui, configManager *helpers.ConfigManager, ...) (*component.TextViewerComponent, error)
- func ProvideThemeCommand(configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus, ...) *commands.ThemeCommand
- func ProvideToolConfirmationController(gui types.Gui, stateAccessor *state.StateAccessor, ...) (*controllers.ToolConfirmationController, error)
- func ProvideUIState() *state.UIState
- func ProvideUpdateCommand(notification types.Notification) *commands.UpdateCommand
- func ProvideUserConfirmationController(gui types.Gui, stateAccessor *state.StateAccessor, ...) (*controllers.UserConfirmationController, error)
- func ProvideWriteCommand(writeController *controllers.WriteController) *commands.WriteCommand
- func ProvideWriteController(gui types.Gui, configManager *helpers.ConfigManager, ...) (*controllers.WriteController, error)
- func ProvideYankCommand(chatState *state.ChatState, clipboard *helpers.Clipboard, ...) *commands.YankCommand
- type App
- func (app *App) Close()
- func (app *App) DisableGlobalKeybindings() error
- func (app *App) EnableGlobalKeybindings() error
- func (app *App) GetGui() *gocui.Gui
- func (app *App) PageDown() error
- func (app *App) PageUp() error
- func (app *App) Run() error
- func (app *App) RunWithMessage(initialMessage string) error
- func (app *App) ScrollDown() error
- func (app *App) ScrollToBottom() error
- func (app *App) ScrollToTop() error
- func (app *App) ScrollUp() error
- type ConfirmationInitializer
- type Gui
- type HelpRenderer
- type HistoryPath
- type KeyAction
- type Keymap
- type KeymapEntry
- type LayoutBuilder
- type ManPageHelpRenderer
- type TUI
Constants ¶
This section is empty.
Variables ¶
var AllComponentsSet = wire.NewSet( StateSet, ComponentSet, LayoutSet, GuiSet, )
AllComponentsSet - All UI components and layout
var AllControllersSet = wire.NewSet( ControllerSet, CommandSet, )
AllControllersSet - All controllers and commands
var CommandSet = wire.NewSet( ProvideCommandRegistry, ProvideCommandSuggester, ProvideSlashCommandSuggester, ProvideContextCommand, ProvideClearCommand, ProvideDebugCommand, ProvideExitCommand, ProvideYankCommand, ProvideThemeCommand, ProvideConfigCommand, ProvideStatusCommand, ProvideWriteCommand, ProvideUpdateCommand, ProvideCommandHandler, )
CommandSet - All commands and command handler
var ComponentSet = wire.NewSet( ProvideMessagesComponent, ProvideInputComponent, ProvideStatusComponent, ProvideTextViewerComponent, ProvideDiffViewerComponent, ProvideDebugComponent, )
ComponentSet - UI components
var ControllerSet = wire.NewSet( ProvideGlobalLogger, ProvideDebugController, ProvideChatController, ProvideLLMContextController, ProvideWriteController, ProvideSlashCommandController, ProvideToolConfirmationController, ProvideUserConfirmationController, InitializeConfirmationControllers, wire.Bind(new(types.Notification), new(*controllers.ChatController)), )
ControllerSet - Controllers with interface bindings
var CoreServicesSet = wire.NewSet( ProvideCommandEventBus, ProvideGenie, ProvideEventBus, ProvideConfigManager, ProvideClipboard, ProvideSlashCommandManager, )
CoreServicesSet - Core services and dependencies
var GuiSet = wire.NewSet( ProvideGui, ProvideHistoryPath, ProvideHistoryPathString, )
GuiSet - GUI and interface types
var LayoutSet = wire.NewSet( ProvideLayoutBuilder, ProvideLayoutManager, )
LayoutSet - Layout management
var ProdAppDepsSet = wire.NewSet( CoreServicesSet, AllComponentsSet, AllControllersSet, NewGocuiGui, NewApp, )
ProdAppDepsSet - Production app dependencies (includes config-based GUI)
var StateSet = wire.NewSet( ProvideChatState, ProvideUIState, ProvideDebugState, ProvideStateAccessor, )
StateSet - All state management
var TestAppDepsSet = wire.NewSet( ProvideCommandEventBus, ProvideEventBus, ProvideConfigManager, ProvideClipboard, ProvideSlashCommandManager, AllComponentsSet, AllControllersSet, NewGocuiGuiWithOutputMode, )
TestAppDepsSet - Test app dependencies (uses custom output mode GUI)
Functions ¶
func NewGocuiGui ¶
func NewGocuiGui(configManager *helpers.ConfigManager) (*gocui.Gui, error)
NewGocuiGui - Production GUI provider (uses config-based output mode)
func NewGocuiGuiWithOutputMode ¶
func NewGocuiGuiWithOutputMode(outputMode gocui.OutputMode) (*gocui.Gui, error)
NewGocuiGuiWithOutputMode - Test/Custom GUI provider (accepts custom output mode)
func ProvideChatController ¶
func ProvideChatController(messagesComponent *component.MessagesComponent, gui types.Gui, genieService genie.Genie, stateAccessor *state.StateAccessor, configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus) (*controllers.ChatController, error)
func ProvideChatState ¶
func ProvideChatState(configManager *helpers.ConfigManager) *state.ChatState
func ProvideClearCommand ¶
func ProvideClearCommand(chatController *controllers.ChatController) *commands.ClearCommand
func ProvideClipboard ¶
func ProvideCommandEventBus ¶
func ProvideCommandEventBus() *events.CommandEventBus
ProvideCommandEventBus provides a shared command event bus instance
func ProvideCommandHandler ¶
func ProvideCommandHandler(commandEventBus2 *events.CommandEventBus, chatController *controllers.ChatController, registry *commands.CommandRegistry, contextCommand *commands.ContextCommand, clearCommand *commands.ClearCommand, debugCommand *commands.DebugCommand, exitCommand *commands.ExitCommand, yankCommand *commands.YankCommand, themeCommand *commands.ThemeCommand, configCommand *commands.ConfigCommand, statusCommand *commands.StatusCommand, writeCommand *commands.WriteCommand, updateCommand *commands.UpdateCommand) *commands.CommandHandler
func ProvideCommandRegistry ¶ added in v0.1.6
func ProvideCommandRegistry() *commands.CommandRegistry
func ProvideCommandSuggester ¶ added in v0.1.6
func ProvideCommandSuggester(registry *commands.CommandRegistry) *shell.CommandSuggester
func ProvideConfigCommand ¶
func ProvideConfigCommand(configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus, gui types.Gui, chatController *controllers.ChatController) *commands.ConfigCommand
func ProvideConfigManager ¶
func ProvideConfigManager() (*helpers.ConfigManager, error)
func ProvideContextCommand ¶
func ProvideContextCommand(llmContextController *controllers.LLMContextController) *commands.ContextCommand
func ProvideDebugCommand ¶
func ProvideDebugCommand(debugController *controllers.DebugController, chatController *controllers.ChatController) *commands.DebugCommand
func ProvideDebugComponent ¶
func ProvideDebugComponent(gui types.Gui, debugState *state.DebugState, configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus) (*component.DebugComponent, error)
func ProvideDebugController ¶
func ProvideDebugController(genieService genie.Genie, gui types.Gui, debugState *state.DebugState, debugComponent *component.DebugComponent, layoutManager *layout.LayoutManager, clipboard *helpers.Clipboard, configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus) (*controllers.DebugController, error)
func ProvideDebugState ¶
func ProvideDebugState() *state.DebugState
func ProvideDiffViewerComponent ¶
func ProvideDiffViewerComponent(gui types.Gui, configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus) (*component.DiffViewerComponent, error)
func ProvideEventBus ¶
ProvideEventBus extracts the event bus from the Genie service
func ProvideExitCommand ¶
func ProvideExitCommand(commandEventBus2 *events.CommandEventBus) *commands.ExitCommand
func ProvideGenie ¶
ProvideGenie provides a shared Genie singleton instance
func ProvideGlobalLogger ¶ added in v0.1.6
ProvideGlobalLogger provides the global logger instance
func ProvideHistoryPathString ¶
func ProvideHistoryPathString(historyPath HistoryPath) string
func ProvideInputComponent ¶
func ProvideInputComponent(gui types.Gui, configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus, clipboard *helpers.Clipboard, historyPath HistoryPath, commandSuggester *shell.CommandSuggester, slashCommandSuggester *shell.SlashCommandSuggester) (*component.InputComponent, error)
func ProvideLLMContextController ¶
func ProvideLLMContextController(gui types.Gui, genieService genie.Genie, layoutManager *layout.LayoutManager, stateAccessor *state.StateAccessor, configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus) (*controllers.LLMContextController, error)
func ProvideLayoutManager ¶
func ProvideLayoutManager(layoutBuilder *LayoutBuilder) *layout.LayoutManager
func ProvideMessagesComponent ¶
func ProvideMessagesComponent(gui types.Gui, chatState *state.ChatState, configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus) (*component.MessagesComponent, error)
func ProvideSlashCommandController ¶ added in v0.1.6
func ProvideSlashCommandController(commandEventBus2 *events.CommandEventBus, slashCommandManager *slashcommands.Manager, notification types.Notification) *controllers.SlashCommandController
func ProvideSlashCommandManager ¶ added in v0.1.6
func ProvideSlashCommandManager() *slashcommands.Manager
ProvideSlashCommandManager provides a shared instance of SlashCommandManager
func ProvideSlashCommandSuggester ¶ added in v0.1.6
func ProvideSlashCommandSuggester(manager *slashcommands.Manager) *shell.SlashCommandSuggester
func ProvideStateAccessor ¶
func ProvideStatusCommand ¶
func ProvideStatusCommand(chatController *controllers.ChatController, genieService genie.Genie) *commands.StatusCommand
func ProvideStatusComponent ¶
func ProvideStatusComponent(gui types.Gui, stateAccessor *state.StateAccessor, configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus) (*component.StatusComponent, error)
func ProvideTextViewerComponent ¶
func ProvideTextViewerComponent(gui types.Gui, configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus) (*component.TextViewerComponent, error)
func ProvideThemeCommand ¶
func ProvideThemeCommand(configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus, chatController *controllers.ChatController) *commands.ThemeCommand
func ProvideToolConfirmationController ¶
func ProvideToolConfirmationController(gui types.Gui, stateAccessor *state.StateAccessor, layoutManager *layout.LayoutManager, inputComponent *component.InputComponent, configManager *helpers.ConfigManager, eventBus events2.EventBus, commandEventBus2 *events.CommandEventBus) (*controllers.ToolConfirmationController, error)
func ProvideUIState ¶
func ProvideUpdateCommand ¶ added in v0.1.6
func ProvideUpdateCommand(notification types.Notification) *commands.UpdateCommand
func ProvideUserConfirmationController ¶
func ProvideUserConfirmationController(gui types.Gui, stateAccessor *state.StateAccessor, layoutManager *layout.LayoutManager, inputComponent *component.InputComponent, diffViewerComponent *component.DiffViewerComponent, configManager *helpers.ConfigManager, eventBus events2.EventBus, commandEventBus2 *events.CommandEventBus) (*controllers.UserConfirmationController, error)
func ProvideWriteCommand ¶
func ProvideWriteCommand(writeController *controllers.WriteController) *commands.WriteCommand
func ProvideWriteController ¶
func ProvideWriteController(gui types.Gui, configManager *helpers.ConfigManager, commandEventBus2 *events.CommandEventBus, layoutManager *layout.LayoutManager) (*controllers.WriteController, error)
func ProvideYankCommand ¶
func ProvideYankCommand(chatState *state.ChatState, clipboard *helpers.Clipboard, chatController *controllers.ChatController) *commands.YankCommand
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func InjectTestApp ¶
func InjectTestApp(genieService genie.Genie, session *genie.Session, outputMode gocui.OutputMode) (*App, error)
InjectTestApp - Test App injector (custom output mode)
func NewApp ¶
func NewApp( gui types.Gui, commandEventBus *events.CommandEventBus, configManager *helpers.ConfigManager, layoutManager *layout.LayoutManager, commandHandler *commands.CommandHandler, notification types.Notification, uiState *state.UIState, confirmationInit *ConfirmationInitializer, slashCommandManager *slashcommands.Manager, ) (*App, error)
func NewAppWithOutputMode ¶
func NewAppWithOutputMode( gui types.Gui, commandEventBus *events.CommandEventBus, configManager *helpers.ConfigManager, layoutManager *layout.LayoutManager, commandHandler *commands.CommandHandler, notification types.Notification, uiState *state.UIState, confirmationInit *ConfirmationInitializer, slashCommandManager *slashcommands.Manager, outputMode *gocui.OutputMode, ) (*App, error)
func (*App) DisableGlobalKeybindings ¶
DisableGlobalKeybindings removes global keybindings (those with empty view name "")
func (*App) EnableGlobalKeybindings ¶
EnableGlobalKeybindings restores global keybindings
func (*App) RunWithMessage ¶ added in v0.1.4
func (*App) ScrollDown ¶
func (*App) ScrollToBottom ¶
func (*App) ScrollToTop ¶
type ConfirmationInitializer ¶
type ConfirmationInitializer struct{}
ConfirmationInitializer is a marker type to ensure confirmation controllers are initialized
func InitializeConfirmationControllers ¶
func InitializeConfirmationControllers( toolController *controllers.ToolConfirmationController, userController *controllers.UserConfirmationController, slashCommandController *controllers.SlashCommandController, ) *ConfirmationInitializer
InitializeConfirmationControllers forces Wire to create confirmation controllers They will subscribe to events during construction but don't need to be held by anything
type Gui ¶
type Gui struct {
// contains filtered or unexported fields
}
func (*Gui) PostUIUpdate ¶
func (g *Gui) PostUIUpdate(fn func())
type HelpRenderer ¶
type HelpRenderer interface {
// RenderHelp generates complete help text in man-page style
RenderHelp() string
// RenderCommands generates the COMMANDS section
RenderCommands() string
// RenderShortcuts generates the SHORTCUTS section
RenderShortcuts() string
// RenderCommandsByCategory generates commands grouped by category
RenderCommandsByCategory() string
// RenderSlashCommands generates slash commands help
RenderSlashCommands() string
}
HelpRenderer generates man-style help documentation from CommandRegistry and Keymap
func NewManPageHelpRenderer ¶
func NewManPageHelpRenderer(registry *commands.CommandRegistry, keymap *Keymap, slashCommandManager *slashcommands.Manager) HelpRenderer
NewManPageHelpRenderer creates a new help renderer
type HistoryPath ¶
type HistoryPath string
HistoryPath represents the path to the chat history file
func ProvideHistoryPath ¶
func ProvideHistoryPath(session *genie.Session) HistoryPath
ProvideHistoryPath provides the chat history file path based on session working directory
type KeyAction ¶
type KeyAction struct {
Type string // "command" or "function"
CommandName string // For "command" type - name of command to execute
Function func() error // For "function" type - direct function to call
}
KeyAction represents an action that can be triggered by a key
func CommandAction ¶
CommandAction creates a KeyAction that executes a command
func FunctionAction ¶
FunctionAction creates a KeyAction that calls a function directly
type Keymap ¶
type Keymap struct {
// contains filtered or unexported fields
}
Keymap manages the application's keybindings
func (*Keymap) AddEntry ¶
func (k *Keymap) AddEntry(entry KeymapEntry)
AddEntry adds a new keybinding entry to the keymap
func (*Keymap) GetEntries ¶
func (k *Keymap) GetEntries() []KeymapEntry
GetEntries returns all keymap entries
type KeymapEntry ¶
type KeymapEntry struct {
Key gocui.Key // The key to bind
Mod gocui.Modifier // Key modifier (Ctrl, Alt, etc.)
Action KeyAction // What action to perform
Description string // Human-readable description
}
KeymapEntry represents a single keybinding in the keymap
type LayoutBuilder ¶
type LayoutBuilder struct {
// contains filtered or unexported fields
}
LayoutBuilder helps construct and configure the layout manager
func NewLayoutBuilder ¶
func NewLayoutBuilder( gui *gocui.Gui, configManager *helpers.ConfigManager, messagesComponent *component.MessagesComponent, inputComponent *component.InputComponent, statusComponent *component.StatusComponent, textViewerComponent *component.TextViewerComponent, diffViewerComponent *component.DiffViewerComponent, debugComponent *component.DebugComponent, ) *LayoutBuilder
NewLayoutBuilder creates a new layout builder with all components
func ProvideLayoutBuilder ¶
func ProvideLayoutBuilder( gui *gocui.Gui, configManager *helpers.ConfigManager, messagesComponent *component.MessagesComponent, inputComponent *component.InputComponent, statusComponent *component.StatusComponent, textViewerComponent *component.TextViewerComponent, diffViewerComponent *component.DiffViewerComponent, debugComponent *component.DebugComponent, ) *LayoutBuilder
func (*LayoutBuilder) GetLayoutManager ¶
func (lb *LayoutBuilder) GetLayoutManager() *layout.LayoutManager
GetLayoutManager returns the configured layout manager
type ManPageHelpRenderer ¶
type ManPageHelpRenderer struct {
// contains filtered or unexported fields
}
ManPageHelpRenderer implements HelpRenderer with man-page style formatting
func (*ManPageHelpRenderer) RenderCommands ¶
func (h *ManPageHelpRenderer) RenderCommands() string
RenderCommands generates the COMMANDS section (flat list)
func (*ManPageHelpRenderer) RenderCommandsByCategory ¶
func (h *ManPageHelpRenderer) RenderCommandsByCategory() string
RenderCommandsByCategory generates commands grouped by category
func (*ManPageHelpRenderer) RenderHelp ¶
func (h *ManPageHelpRenderer) RenderHelp() string
RenderHelp generates complete man-style help documentation
func (*ManPageHelpRenderer) RenderShortcuts ¶
func (h *ManPageHelpRenderer) RenderShortcuts() string
RenderShortcuts generates the SHORTCUTS section by dynamically analyzing keymap
func (*ManPageHelpRenderer) RenderSlashCommands ¶ added in v0.1.6
func (h *ManPageHelpRenderer) RenderSlashCommands() string
RenderSlashCommands generates slash commands help