tui

package
v1.2.96 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App is the main TUI application.

func NewApp

func NewApp(p provider.Provider, model *provider.Model, settings *config.Settings, sess *session.Manager, registry *tools.Registry, sandboxInfo string, extraContext string, ruleContent string, skillsMgr *skills.Manager, initialMode string, multiAgent bool, delegateMode bool, agentMgr *agent.AgentManager, cronStore cron.CronStore, scheduler *cron.Scheduler) *App

NewApp creates a new TUI application.

func NewAppWithWorkflows

func NewAppWithWorkflows(p provider.Provider, model *provider.Model, settings *config.Settings, sess *session.Manager, registry *tools.Registry, sandboxInfo string, extraContext string, ruleContent string, skillsMgr *skills.Manager, initialMode string, multiAgent bool, delegateMode bool, workflows bool, agentMgr *agent.AgentManager, cronStore cron.CronStore, scheduler *cron.Scheduler) *App

func NewAppWithWorkflowsAndAllow

func NewAppWithWorkflowsAndAllow(p provider.Provider, model *provider.Model, settings *config.Settings, sess *session.Manager, registry *tools.Registry, sandboxInfo string, extraContext string, ruleContent string, skillsMgr *skills.Manager, initialMode string, multiAgent bool, delegateMode bool, workflows bool, agentMgr *agent.AgentManager, cronStore cron.CronStore, scheduler *cron.Scheduler, providerKey string, allow *config.AllowConfig) *App

NewAppWithWorkflowsAndAllow creates a new TUI application. providerKey is the user-configured settings.json provider key (e.g. "xiaomi", "doubao"); when empty the resolved vendor name from p.Name() is used as a fallback.

func (*App) Init

func (a *App) Init() tea.Cmd

Init implements tea.Model.

func (*App) LoadHistoryMessages

func (a *App) LoadHistoryMessages()

LoadHistoryMessages loads messages from session history into TUI display.

func (*App) ReloadRequested

func (a *App) ReloadRequested() bool

ReloadRequested reports whether the user asked to reload via /reload.

func (*App) SetAutoOpenAuthDialog

func (a *App) SetAutoOpenAuthDialog(v bool)

SetAutoOpenAuthDialog tells the TUI to open the /auth dialog automatically on startup. This is used when settings.json was just created.

func (*App) SetBackgroundSubmitter added in v1.1.78

func (a *App) SetBackgroundSubmitter(submitter serviceruntime.BackgroundSubmitter)

SetBackgroundSubmitter connects the TUI to the serve-owned durable Responses coordinator. Standalone TUI runs leave it unset and use the provider's synchronous availability fallback.

func (*App) SetBrowserEnabled

func (a *App) SetBrowserEnabled(enabled bool, skillInBase bool)

SetBrowserEnabled records browser-tool startup state. skillInBase is true when the browser skill context has already been included in baseExtraContext.

func (*App) SetInitialMessage

func (a *App) SetInitialMessage(msg string)

SetInitialMessage sets an initial message to display when the TUI starts.

func (*App) SetProgram

func (a *App) SetProgram(p *tea.Program)

SetProgram stores the Bubble Tea program used for deferred UI updates.

func (*App) SetRuntime added in v1.2.83

func (a *App) SetRuntime(runtime *agentruntime.SessionRuntime)

SetRuntime attaches the shared front-end-neutral runtime to the TUI. The adapter aliases are synchronized for compatibility with existing commands.

func (*App) ShowUpdateNotice

func (a *App) ShowUpdateNotice(notice string)

ShowUpdateNotice displays an update notification from a background check.

func (*App) Update

func (a *App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (*App) View

func (a *App) View() string

View implements tea.Model.

type ClipboardImageSaver

type ClipboardImageSaver interface {
	SaveImage(ctx context.Context, projectDir string) (path string, ok bool, err error)
}

ClipboardImageSaver is a compatibility bridge for old tests/integrations. Production uses ClipboardImageSource and Runtime.PrepareInput instead.

type ClipboardImageSource added in v1.2.96

type ClipboardImageSource interface {
	OpenImage(ctx context.Context) (stream agentruntime.InputStream, ok bool, err error)
}

ClipboardImageSource exposes authenticated clipboard bytes as a one-shot Runtime input stream. The TUI never chooses a project cache path.

type CommandSpec added in v1.1.82

type CommandSpec struct {
	Name        string
	Value       string
	Usage       string
	Description i18n.MessageID
}

CommandSpec keeps slash-command syntax stable while localizing user-facing descriptions. Syntax is protocol text and must remain English.

type FileOpener

type FileOpener interface {
	Open(path string) error
}

type InputEvent

type InputEvent struct {
	// contains filtered or unexported fields
}

InputEvent represents a queued input event

Directories

Path Synopsis
components

Jump to

Keyboard shortcuts

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