tui

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, ag *agent.Agent, model, version, cwd string, sk []skills.Skill, options ...Option) error

Run starts the Bubble Tea chat TUI. It returns when the user quits. cwd is the effective working directory for display and file references. sk is the loaded skill set used for $name expansion (nil when the feature is off).

Types

type ModelChoice added in v0.2.0

type ModelChoice struct {
	ID          string
	Name        string
	Description string
}

type Option added in v0.2.0

type Option func(*Options)

func WithAfterSend added in v0.2.0

func WithAfterSend(fn func() error) Option

func WithIO added in v0.6.0

func WithIO(input io.Reader, output io.Writer) Option

WithIO configures the terminal streams used by Bubble Tea. When omitted, Run preserves the standard stdin/stdout behavior.

func WithModelSwitcher added in v0.3.0

func WithModelSwitcher(provider string, choices []ModelChoice, fn func(string) error) Option

WithModelSwitcher enables model selection for the active provider. The callback must finish the model switch before returning.

func WithPhases added in v0.6.0

func WithPhases(definitions []phase.Definition) Option

WithPhases supplies the built-in and configured named prompts shown as slash commands and as a compact label for the active turn.

func WithStepEvents added in v0.2.0

func WithStepEvents(ch <-chan factory.Event) Option

WithStepEvents subscribes the TUI to the factory supervisor's event stream, which the chat view folds into live subagent activity while agent calls execute.

func WithVerbose added in v0.3.0

func WithVerbose(verbose bool) Option

WithVerbose controls tool activity rendering: false (the default) shows live activity and concise completed receipts while hiding successful tool result bodies; true restores full tool call/result cards. Errors always render in full regardless of this setting.

func WithWorkflowEvents added in v0.2.0

func WithWorkflowEvents(ch <-chan workflow.Event) Option

type Options added in v0.2.0

type Options struct {
	AfterSend      func() error
	ModelChoices   []ModelChoice
	Provider       string
	ModelSwitcher  func(string) error
	StepEvents     <-chan factory.Event
	WorkflowEvents <-chan workflow.Event
	Phases         []phase.Definition
	Verbose        bool
	Input          io.Reader
	Output         io.Writer
}

Jump to

Keyboard shortcuts

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