modes

package
v0.0.0-...-204bea8 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package modes provides the four mode implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCHandler

type GRPCHandler struct {
	Service *service.Service
	Addr    string
}

GRPCHandler starts a gRPC server exposing the AgentService.

func (*GRPCHandler) Run

func (h *GRPCHandler) Run(_ []string) error

type Handler

type Handler interface {
	Run(args []string) error
}

Handler is the interface for mode implementations.

func NewGRPCHandler

func NewGRPCHandler(svc *service.Service, addr string) Handler

NewGRPCHandler creates a GRPCHandler.

func NewInteractiveHandler

func NewInteractiveHandler(client pb.AgentServiceClient, sessionID string, cfg *config.Config, theme string, opts interactive.Options) Handler

NewInteractiveHandler creates an interactive mode handler.

func NewPrintHandler

func NewPrintHandler(client pb.AgentServiceClient, sessionID string, opts PrintOptions) Handler

NewPrintHandler creates a print mode handler.

type InteractiveHandler

type InteractiveHandler struct {
	Client    pb.AgentServiceClient
	SessionID string
	Config    *config.Config
	Theme     string
	Options   interactive.Options
}

InteractiveHandler handles interactive mode (bubbletea TUI).

func (*InteractiveHandler) Run

func (h *InteractiveHandler) Run(args []string) error

type PrintHandler

type PrintHandler struct {
	Client    pb.AgentServiceClient
	SessionID string
	Options   PrintOptions
}

PrintHandler handles print mode (single-shot output).

func (*PrintHandler) Run

func (h *PrintHandler) Run(args []string) error

type PrintOptions

type PrintOptions struct {
	NoSession      bool
	PreloadSession string // "continue", "resume", "fork:<path>"
	SystemPrompt   string
	ThinkingLevel  string
	JSON           bool
	DryRun         bool
}

PrintOptions holds optional startup options for PrintHandler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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