Documentation
¶
Index ¶
- func Run(ctx context.Context, ag *agent.Agent, model, version, cwd string, ...) error
- type ModelChoice
- type Option
- func WithAfterSend(fn func() error) Option
- func WithIO(input io.Reader, output io.Writer) Option
- func WithModelSwitcher(provider string, choices []ModelChoice, fn func(string) error) Option
- func WithPhases(definitions []phase.Definition) Option
- func WithStepEvents(ch <-chan factory.Event) Option
- func WithVerbose(verbose bool) Option
- func WithWorkflowEvents(ch <-chan workflow.Event) Option
- type Options
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 Option ¶ added in v0.2.0
type Option func(*Options)
func WithAfterSend ¶ added in v0.2.0
func WithIO ¶ added in v0.6.0
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
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
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.