Documentation
¶
Index ¶
- type Options
- type Service
- func (s *Service) HandleComputerUsePaused(msg domain.ComputerUsePausedEvent) tea.Cmd
- func (s *Service) HandleComputerUseResumed(_ domain.ComputerUseResumedEvent) (tea.Cmd, bool)
- func (s *Service) HandlePlanApprovalRequested(msg domain.PlanApprovalRequestedEvent) tea.Cmd
- func (s *Service) HandlePlanApprovalResponse(msg domain.PlanApprovalResponseEvent) (tea.Cmd, bool)
- func (s *Service) HandleUserQuestionRequested(msg domain.UserQuestionRequestedEvent) tea.Cmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
AgentService domain.AgentService
ConversationRepo domain.ConversationRepository
StateManager stateManager
}
Options bundles the dependencies needed to construct a Service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service owns the UI side of "pause the assistant turn pending external decision" events.
func NewService ¶
NewService creates a new approval coordinator.
func (*Service) HandleComputerUsePaused ¶
func (s *Service) HandleComputerUsePaused(msg domain.ComputerUsePausedEvent) tea.Cmd
HandleComputerUsePaused cancels the in-flight request and marks state as paused. No restart - the user will manually resume.
func (*Service) HandleComputerUseResumed ¶
HandleComputerUseResumed clears the pause state, injects a hidden "please continue" user message, and signals the orchestrator to restart streaming.
func (*Service) HandlePlanApprovalRequested ¶
func (s *Service) HandlePlanApprovalRequested(msg domain.PlanApprovalRequestedEvent) tea.Cmd
HandlePlanApprovalRequested sets up the plan-approval UI state and emits an info status. Always returns a cmd; no restart side-effect.
func (*Service) HandlePlanApprovalResponse ¶
HandlePlanApprovalResponse processes the user's accept/reject decision on a plan and returns whatever cmds the orchestrator should run plus a restart flag (true → orchestrator should kick a new ChatCompletionRunner.Start()).
func (*Service) HandleUserQuestionRequested ¶ added in v0.124.0
func (s *Service) HandleUserQuestionRequested(msg domain.UserQuestionRequestedEvent) tea.Cmd
HandleUserQuestionRequested sets up the AskUserQuestion form state. The form renders as a floating box over the chat (like tool approval), so the view stays ViewStateChat and keys are intercepted while the form state is set. Unlike plan approval this does NOT stop the agent loop: the tool's Execute is blocked on the response channel and resumes when the user submits or cancels.