tui

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 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 string, sk []skills.Skill, options ...Option) error

Run starts the Bubble Tea chat TUI. It returns when the user quits. 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 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 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
	Verbose        bool
}

Jump to

Keyboard shortcuts

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