approvalcoord

package
v0.120.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

func NewService(opts Options) *Service

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

func (s *Service) HandleComputerUseResumed(_ domain.ComputerUseResumedEvent) (tea.Cmd, bool)

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

func (s *Service) HandlePlanApprovalResponse(msg domain.PlanApprovalResponseEvent) (tea.Cmd, bool)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL