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)
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 domain.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()).