tui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 33 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 {
	Provider    string
	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 WithModelChoices added in v0.2.0

func WithModelChoices(choices []ModelChoice) Option

func WithModelSwitcher added in v0.3.0

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

WithModelSwitcher enables provider-aware model selection. The callback must finish the backend switch before returning; the TUI updates its labels only after it succeeds.

func WithPermissionMode added in v0.2.0

func WithPermissionMode(mode string) Option

func WithSessions added in v0.2.0

func WithSessions(store *session.Store, current *session.Session, onResume func(*session.Session) error) Option

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 trees 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
	PermissionMode  string
	SessionStore    *session.Store
	CurrentSession  *session.Session
	OnSessionResume func(*session.Session) error
	ModelChoices    []ModelChoice
	Provider        string
	ModelSwitcher   func(ModelChoice) 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