Documentation
¶
Index ¶
- type ChatHandler
- func (h *ChatHandler) ClearBashDetachChan()
- func (h *ChatHandler) ExtractMarkdownSummary(content string) (string, bool)
- func (h *ChatHandler) FormatMetrics(metrics *domain.ChatMetrics) string
- func (h *ChatHandler) GetActiveToolCallID() string
- func (h *ChatHandler) GetBashDetachChan() chan<- struct{}
- func (h *ChatHandler) Handle(msg tea.Msg) tea.Cmd
- func (h *ChatHandler) HandleA2ATaskCompletedEvent(msg domain.A2ATaskCompletedEvent) tea.Cmd
- func (h *ChatHandler) HandleA2ATaskFailedEvent(msg domain.A2ATaskFailedEvent) tea.Cmd
- func (h *ChatHandler) HandleA2ATaskInputRequiredEvent(msg domain.A2ATaskInputRequiredEvent) tea.Cmd
- func (h *ChatHandler) HandleA2ATaskStatusUpdateEvent(msg domain.A2ATaskStatusUpdateEvent) tea.Cmd
- func (h *ChatHandler) HandleA2ATaskSubmittedEvent(msg domain.A2ATaskSubmittedEvent) tea.Cmd
- func (h *ChatHandler) HandleA2AToolCallExecutedEvent(msg domain.A2AToolCallExecutedEvent) tea.Cmd
- func (h *ChatHandler) HandleAgentStatusUpdateEvent(msg domain.AgentStatusUpdateEvent) tea.Cmd
- func (h *ChatHandler) HandleBackgroundShellRequest() tea.Cmd
- func (h *ChatHandler) HandleBashCommand(commandText string) tea.Cmd
- func (h *ChatHandler) HandleBashCommandCompletedEvent(msg domain.BashCommandCompletedEvent) tea.Cmd
- func (h *ChatHandler) HandleBashOutputChunkEvent(msg domain.BashOutputChunkEvent) tea.Cmd
- func (h *ChatHandler) HandleChatChunkEvent(msg domain.ChatChunkEvent) tea.Cmd
- func (h *ChatHandler) HandleChatCompleteEvent(msg domain.ChatCompleteEvent) tea.Cmd
- func (h *ChatHandler) HandleChatErrorEvent(msg domain.ChatErrorEvent) tea.Cmd
- func (h *ChatHandler) HandleChatStartEvent(msg domain.ChatStartEvent) tea.Cmd
- func (h *ChatHandler) HandleCommand(commandText string) tea.Cmd
- func (h *ChatHandler) HandleComputerUsePausedEvent(msg domain.ComputerUsePausedEvent) tea.Cmd
- func (h *ChatHandler) HandleComputerUseResumedEvent(msg domain.ComputerUseResumedEvent) tea.Cmd
- func (h *ChatHandler) HandleConversationSelectedEvent(msg domain.ConversationSelectedEvent) tea.Cmd
- func (h *ChatHandler) HandleFileSelectionRequestEvent(msg domain.FileSelectionRequestEvent) tea.Cmd
- func (h *ChatHandler) HandleMessageQueuedEvent(_ domain.MessageQueuedEvent) tea.Cmd
- func (h *ChatHandler) HandleOptimizationStatusEvent(msg domain.OptimizationStatusEvent) tea.Cmd
- func (h *ChatHandler) HandlePlanApprovalRequestedEvent(msg domain.PlanApprovalRequestedEvent) tea.Cmd
- func (h *ChatHandler) HandlePlanApprovalResponseEvent(msg domain.PlanApprovalResponseEvent) tea.Cmd
- func (h *ChatHandler) HandleRolloverCompletedEvent(msg domain.RolloverCompletedEvent) tea.Cmd
- func (h *ChatHandler) HandleSubagentCompletedEvent(_ domain.SubagentCompletedEvent) tea.Cmd
- func (h *ChatHandler) HandleSubagentFailedEvent(_ domain.SubagentFailedEvent) tea.Cmd
- func (h *ChatHandler) HandleSubagentSubmittedEvent(_ domain.SubagentSubmittedEvent) tea.Cmd
- func (h *ChatHandler) HandleTodoUpdateChatEvent(msg domain.TodoUpdateChatEvent) tea.Cmd
- func (h *ChatHandler) HandleToolApprovalRequestedEvent(msg domain.ToolApprovalRequestedEvent) tea.Cmd
- func (h *ChatHandler) HandleToolApprovalResponseEvent(msg domain.ToolApprovalResponseEvent) tea.Cmd
- func (h *ChatHandler) HandleToolCallReadyEvent(msg domain.ToolCallReadyEvent) tea.Cmd
- func (h *ChatHandler) HandleToolCallUpdateEvent(msg domain.ToolCallUpdateEvent) tea.Cmd
- func (h *ChatHandler) HandleToolCancelledEvent(msg domain.ToolCancelledEvent) tea.Cmd
- func (h *ChatHandler) HandleToolCommand(commandText string) tea.Cmd
- func (h *ChatHandler) HandleToolExecutionCompletedEvent(msg domain.ToolExecutionCompletedEvent) tea.Cmd
- func (h *ChatHandler) HandleToolExecutionProgressEvent(msg domain.ToolExecutionProgressEvent) tea.Cmd
- func (h *ChatHandler) HandleToolExecutionStartedEvent(msg domain.ToolExecutionStartedEvent) tea.Cmd
- func (h *ChatHandler) HandleUserInputEvent(msg domain.UserInputEvent) tea.Cmd
- func (h *ChatHandler) HandleUserQuestionRequestedEvent(msg domain.UserQuestionRequestedEvent) tea.Cmd
- func (h *ChatHandler) ListenForChatEvents(eventChan <-chan domain.ChatEvent) tea.Cmd
- func (h *ChatHandler) ListenForEvents(eventChan <-chan tea.Msg) tea.Cmd
- func (h *ChatHandler) ParseArguments(argsStr string) (map[string]any, error)
- func (h *ChatHandler) ParseToolCall(input string) (string, map[string]any, error)
- func (h *ChatHandler) SetActiveToolCallID(id string)
- func (h *ChatHandler) SetBashDetachChan(ch chan<- struct{})
- type ChatMessageProcessor
- type ChatShortcutHandler
- type MessageHistoryHandler
- func (h *MessageHistoryHandler) HandleEdit(event domain.MessageHistoryEditEvent) tea.Cmd
- func (h *MessageHistoryHandler) HandleEditSubmit(event domain.MessageEditSubmitEvent) tea.Cmd
- func (h *MessageHistoryHandler) HandleNavigateBackInTime(event domain.NavigateBackInTimeEvent) tea.Cmd
- func (h *MessageHistoryHandler) HandleRestore(event domain.MessageHistoryRestoreEvent) tea.Cmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatHandler ¶ added in v0.27.0
type ChatHandler struct {
// contains filtered or unexported fields
}
func NewChatHandler ¶ added in v0.27.0
func NewChatHandler( agentService domain.AgentService, conversationRepo domain.ConversationRepository, conversationOptimizer domain.ConversationOptimizer, sessionRolloverManager *services.SessionRolloverManager, modelService domain.ModelService, toolService domain.ToolService, fileService domain.FileService, imageService domain.ImageService, skillsService domain.SkillsService, githubIssueService domain.GitHubIssueService, shortcutRegistry *shortcuts.Registry, stateManager domain.StateManager, messageQueue domain.MessageQueue, taskRetentionService domain.TaskRetentionService, backgroundTaskService domain.BackgroundTaskService, backgroundShellService domain.BackgroundShellService, agentManager domain.AgentManager, cfg *config.Config, a2aTaskCoordinator domain.A2ATaskCoordinator, approvalCoordinator domain.ApprovalCoordinator, completionRunner domain.ChatCompletionRunner, directExec domain.DirectExecutionService, toolCoordinator domain.ToolExecutionCoordinator, ) *ChatHandler
func (*ChatHandler) ClearBashDetachChan ¶ added in v0.81.0
func (h *ChatHandler) ClearBashDetachChan()
ClearBashDetachChan satisfies the legacy domain.ChatHandler interface by forwarding to DirectExecutionService.
func (*ChatHandler) ExtractMarkdownSummary ¶ added in v0.45.4
func (h *ChatHandler) ExtractMarkdownSummary(content string) (string, bool)
ExtractMarkdownSummary delegates to ChatMessageProcessor.
func (*ChatHandler) FormatMetrics ¶ added in v0.45.4
func (h *ChatHandler) FormatMetrics(metrics *domain.ChatMetrics) string
FormatMetrics formats LLM completion metrics for the status bar, computing the request wall-clock time from the most recent user message.
func (*ChatHandler) GetActiveToolCallID ¶ added in v0.97.0
func (h *ChatHandler) GetActiveToolCallID() string
GetActiveToolCallID satisfies the legacy domain.ChatHandler interface by forwarding to ToolExecutionCoordinator (the actual owner post-#529).
func (*ChatHandler) GetBashDetachChan ¶ added in v0.81.0
func (h *ChatHandler) GetBashDetachChan() chan<- struct{}
GetBashDetachChan satisfies the legacy domain.ChatHandler interface by forwarding to DirectExecutionService.
func (*ChatHandler) Handle ¶ added in v0.27.0
func (h *ChatHandler) Handle(msg tea.Msg) tea.Cmd
Handle routes incoming messages to appropriate handler methods based on message type. TODO - refactor this
func (*ChatHandler) HandleA2ATaskCompletedEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleA2ATaskCompletedEvent( msg domain.A2ATaskCompletedEvent, ) tea.Cmd
func (*ChatHandler) HandleA2ATaskFailedEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleA2ATaskFailedEvent( msg domain.A2ATaskFailedEvent, ) tea.Cmd
func (*ChatHandler) HandleA2ATaskInputRequiredEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleA2ATaskInputRequiredEvent( msg domain.A2ATaskInputRequiredEvent, ) tea.Cmd
func (*ChatHandler) HandleA2ATaskStatusUpdateEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleA2ATaskStatusUpdateEvent( msg domain.A2ATaskStatusUpdateEvent, ) tea.Cmd
func (*ChatHandler) HandleA2ATaskSubmittedEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleA2ATaskSubmittedEvent( msg domain.A2ATaskSubmittedEvent, ) tea.Cmd
func (*ChatHandler) HandleA2AToolCallExecutedEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleA2AToolCallExecutedEvent( msg domain.A2AToolCallExecutedEvent, ) tea.Cmd
func (*ChatHandler) HandleAgentStatusUpdateEvent ¶ added in v0.67.0
func (h *ChatHandler) HandleAgentStatusUpdateEvent(msg domain.AgentStatusUpdateEvent) tea.Cmd
HandleAgentStatusUpdateEvent handles agent status updates
func (*ChatHandler) HandleBackgroundShellRequest ¶ added in v0.97.0
func (h *ChatHandler) HandleBackgroundShellRequest() tea.Cmd
HandleBackgroundShellRequest signals the currently-running bash command to detach to the background. Delegates to DirectExecutionService.
func (*ChatHandler) HandleBashCommand ¶ added in v0.97.0
func (h *ChatHandler) HandleBashCommand(commandText string) tea.Cmd
HandleBashCommand processes bash commands starting with !. Delegates to DirectExecutionService.
func (*ChatHandler) HandleBashCommandCompletedEvent ¶ added in v0.68.0
func (h *ChatHandler) HandleBashCommandCompletedEvent( msg domain.BashCommandCompletedEvent, ) tea.Cmd
func (*ChatHandler) HandleBashOutputChunkEvent ¶ added in v0.65.0
func (h *ChatHandler) HandleBashOutputChunkEvent( msg domain.BashOutputChunkEvent, ) tea.Cmd
func (*ChatHandler) HandleChatChunkEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleChatChunkEvent( msg domain.ChatChunkEvent, ) tea.Cmd
func (*ChatHandler) HandleChatCompleteEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleChatCompleteEvent( msg domain.ChatCompleteEvent, ) tea.Cmd
func (*ChatHandler) HandleChatErrorEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleChatErrorEvent( msg domain.ChatErrorEvent, ) tea.Cmd
func (*ChatHandler) HandleChatStartEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleChatStartEvent( msg domain.ChatStartEvent, ) tea.Cmd
func (*ChatHandler) HandleCommand ¶ added in v0.97.0
func (h *ChatHandler) HandleCommand(commandText string) tea.Cmd
HandleCommand parses a /shortcut and delegates to the registered handler.
func (*ChatHandler) HandleComputerUsePausedEvent ¶ added in v0.96.0
func (h *ChatHandler) HandleComputerUsePausedEvent(msg domain.ComputerUsePausedEvent) tea.Cmd
HandleComputerUsePausedEvent handles computer use pause events
func (*ChatHandler) HandleComputerUseResumedEvent ¶ added in v0.96.0
func (h *ChatHandler) HandleComputerUseResumedEvent(msg domain.ComputerUseResumedEvent) tea.Cmd
HandleComputerUseResumedEvent handles computer use resume events
func (*ChatHandler) HandleConversationSelectedEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleConversationSelectedEvent( msg domain.ConversationSelectedEvent, ) tea.Cmd
func (*ChatHandler) HandleFileSelectionRequestEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleFileSelectionRequestEvent( msg domain.FileSelectionRequestEvent, ) tea.Cmd
func (*ChatHandler) HandleMessageQueuedEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleMessageQueuedEvent( _ domain.MessageQueuedEvent, ) tea.Cmd
func (*ChatHandler) HandleOptimizationStatusEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleOptimizationStatusEvent( msg domain.OptimizationStatusEvent, ) tea.Cmd
func (*ChatHandler) HandlePlanApprovalRequestedEvent ¶ added in v0.68.0
func (h *ChatHandler) HandlePlanApprovalRequestedEvent( msg domain.PlanApprovalRequestedEvent, ) tea.Cmd
func (*ChatHandler) HandlePlanApprovalResponseEvent ¶ added in v0.68.0
func (h *ChatHandler) HandlePlanApprovalResponseEvent( msg domain.PlanApprovalResponseEvent, ) tea.Cmd
func (*ChatHandler) HandleRolloverCompletedEvent ¶ added in v0.114.0
func (h *ChatHandler) HandleRolloverCompletedEvent( msg domain.RolloverCompletedEvent, ) tea.Cmd
HandleRolloverCompletedEvent resumes the deferred work after the async rollover (kicked off by ChatMessageProcessor.compactThenContinue) finishes.
func (*ChatHandler) HandleSubagentCompletedEvent ¶ added in v0.124.0
func (h *ChatHandler) HandleSubagentCompletedEvent(_ domain.SubagentCompletedEvent) tea.Cmd
func (*ChatHandler) HandleSubagentFailedEvent ¶ added in v0.124.0
func (h *ChatHandler) HandleSubagentFailedEvent(_ domain.SubagentFailedEvent) tea.Cmd
func (*ChatHandler) HandleSubagentSubmittedEvent ¶ added in v0.124.0
func (h *ChatHandler) HandleSubagentSubmittedEvent(_ domain.SubagentSubmittedEvent) tea.Cmd
Subagent lifecycle events drive the live tree in the conversation view (see ConversationView.renderSubagentTree). The handler here only needs to keep the chat event listener pumping, since these events arrive on the chat event channel and the conversation view consumes them for rendering.
func (*ChatHandler) HandleTodoUpdateChatEvent ¶ added in v0.63.1
func (h *ChatHandler) HandleTodoUpdateChatEvent( msg domain.TodoUpdateChatEvent, ) tea.Cmd
HandleTodoUpdateChatEvent converts the chat event to a UI event for the todo component
func (*ChatHandler) HandleToolApprovalRequestedEvent ¶ added in v0.56.0
func (h *ChatHandler) HandleToolApprovalRequestedEvent( msg domain.ToolApprovalRequestedEvent, ) tea.Cmd
func (*ChatHandler) HandleToolApprovalResponseEvent ¶ added in v0.56.0
func (h *ChatHandler) HandleToolApprovalResponseEvent( msg domain.ToolApprovalResponseEvent, ) tea.Cmd
func (*ChatHandler) HandleToolCallReadyEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleToolCallReadyEvent( msg domain.ToolCallReadyEvent, ) tea.Cmd
func (*ChatHandler) HandleToolCallUpdateEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleToolCallUpdateEvent( msg domain.ToolCallUpdateEvent, ) tea.Cmd
func (*ChatHandler) HandleToolCancelledEvent ¶ added in v0.110.1
func (h *ChatHandler) HandleToolCancelledEvent( msg domain.ToolCancelledEvent, ) tea.Cmd
func (*ChatHandler) HandleToolCommand ¶ added in v0.97.0
func (h *ChatHandler) HandleToolCommand(commandText string) tea.Cmd
HandleToolCommand processes tool commands starting with !!. Delegates to DirectExecutionService.
func (*ChatHandler) HandleToolExecutionCompletedEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleToolExecutionCompletedEvent( msg domain.ToolExecutionCompletedEvent, ) tea.Cmd
func (*ChatHandler) HandleToolExecutionProgressEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleToolExecutionProgressEvent( msg domain.ToolExecutionProgressEvent, ) tea.Cmd
func (*ChatHandler) HandleToolExecutionStartedEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleToolExecutionStartedEvent( msg domain.ToolExecutionStartedEvent, ) tea.Cmd
func (*ChatHandler) HandleUserInputEvent ¶ added in v0.53.0
func (h *ChatHandler) HandleUserInputEvent( msg domain.UserInputEvent, ) tea.Cmd
func (*ChatHandler) HandleUserQuestionRequestedEvent ¶ added in v0.124.0
func (h *ChatHandler) HandleUserQuestionRequestedEvent( msg domain.UserQuestionRequestedEvent, ) tea.Cmd
HandleUserQuestionRequestedEvent sets up the AskUserQuestion form. The agent loop stays blocked in the tool until the user answers, so there is no restart.
func (*ChatHandler) ListenForChatEvents ¶ added in v0.97.0
func (h *ChatHandler) ListenForChatEvents(eventChan <-chan domain.ChatEvent) tea.Cmd
ListenForChatEvents creates a tea.Cmd that listens for the next event from the channel. Wraps the shared eventlistener service so callers within this package and the legacy domain.ChatHandler interface continue to work.
func (*ChatHandler) ListenForEvents ¶ added in v0.97.0
func (h *ChatHandler) ListenForEvents(eventChan <-chan tea.Msg) tea.Cmd
ListenForEvents reads one event off a generic tea.Msg channel as a tea.Cmd. Kept on the orchestrator because domain.ChatHandler still exposes it and the runner-internal handlers (tool execution progress) call it directly.
func (*ChatHandler) ParseArguments ¶ added in v0.45.4
func (h *ChatHandler) ParseArguments(argsStr string) (map[string]any, error)
ParseArguments satisfies the legacy domain.ChatHandler interface by delegating to DirectExecutionService.
func (*ChatHandler) ParseToolCall ¶ added in v0.45.4
ParseToolCall satisfies the legacy domain.ChatHandler interface by delegating to DirectExecutionService.
func (*ChatHandler) SetActiveToolCallID ¶ added in v0.97.0
func (h *ChatHandler) SetActiveToolCallID(id string)
SetActiveToolCallID satisfies the legacy domain.ChatHandler interface by forwarding to ToolExecutionCoordinator.
func (*ChatHandler) SetBashDetachChan ¶ added in v0.81.0
func (h *ChatHandler) SetBashDetachChan(ch chan<- struct{})
SetBashDetachChan satisfies the legacy domain.ChatHandler interface by forwarding to DirectExecutionService (the actual owner post-#529).
type ChatMessageProcessor ¶ added in v0.45.4
type ChatMessageProcessor struct {
// contains filtered or unexported fields
}
ChatMessageProcessor handles message processing logic
func NewChatMessageProcessor ¶ added in v0.45.4
func NewChatMessageProcessor(handler *ChatHandler) *ChatMessageProcessor
NewChatMessageProcessor creates a new message processor
func (*ChatMessageProcessor) ExtractMarkdownSummary ¶ added in v0.45.4
func (p *ChatMessageProcessor) ExtractMarkdownSummary(content string) (string, bool)
ExtractMarkdownSummary extracts the "## Summary" section from markdown content (exposed for testing)
type ChatShortcutHandler ¶ added in v0.45.4
type ChatShortcutHandler struct {
// contains filtered or unexported fields
}
ChatShortcutHandler handles shortcut execution and side effects
func NewChatShortcutHandler ¶ added in v0.45.4
func NewChatShortcutHandler(handler *ChatHandler) *ChatShortcutHandler
NewChatShortcutHandler creates a new shortcut handler
type MessageHistoryHandler ¶ added in v0.91.0
type MessageHistoryHandler struct {
// contains filtered or unexported fields
}
MessageHistoryHandler handles message history navigation and restoration
func NewMessageHistoryHandler ¶ added in v0.91.0
func NewMessageHistoryHandler( stateManager domain.StateManager, conversationRepo domain.ConversationRepository, ) *MessageHistoryHandler
NewMessageHistoryHandler creates a new message history handler
func (*MessageHistoryHandler) HandleEdit ¶ added in v0.92.0
func (h *MessageHistoryHandler) HandleEdit(event domain.MessageHistoryEditEvent) tea.Cmd
HandleEdit processes the message history edit event
func (*MessageHistoryHandler) HandleEditSubmit ¶ added in v0.92.0
func (h *MessageHistoryHandler) HandleEditSubmit(event domain.MessageEditSubmitEvent) tea.Cmd
HandleEditSubmit processes the message edit submission
func (*MessageHistoryHandler) HandleNavigateBackInTime ¶ added in v0.91.0
func (h *MessageHistoryHandler) HandleNavigateBackInTime(event domain.NavigateBackInTimeEvent) tea.Cmd
HandleNavigateBackInTime processes the navigate back in time event
func (*MessageHistoryHandler) HandleRestore ¶ added in v0.91.0
func (h *MessageHistoryHandler) HandleRestore(event domain.MessageHistoryRestoreEvent) tea.Cmd
HandleRestore processes the message history restore event