tui

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 25 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableThemes

func AvailableThemes() []string

func ExecName

func ExecName() string

Returns executable name (agent-gopher if 'go run' is used)

func InitThemes

func InitThemes() error

Writes built-in themes as .theme files to the themes directory if not written

func LoadTheme

func LoadTheme(name string) error

func ResumeHint

func ResumeHint(path string) string

Returns the command that resumes the session logged at path

func Run

func Run(ag *agent.Agent, resumeID string, startupErrors []string) error

Starts the TUI and blocks until it exits. If resumeID is non-empty the previous session is loaded and its conversation restored. startupErrors are shown as errors once the TUI opens.

func SaveActiveSession

func SaveActiveSession() (string, error)

Flushes the running TUI's chat state

func ThemeWarning

func ThemeWarning() string

Returns and clears any warning from theme loading

Types

type Model

type Model struct {
	IsStreaming bool
	// contains filtered or unexported fields
}

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Update

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

func (*Model) View

func (m *Model) View() tea.View

type Theme

type Theme struct {
	Name string

	User        string // user label color
	Agent       string // agent label color
	Tool        string // tool call color
	Error       string // error color
	Dim         string // dim text
	Title       string // title bar color
	Border      string // input box border
	Prompt      string // permission prompt border
	InputBorder string // inactive input border
	Code        string // chroma style for code blocks
}

func ActiveTheme

func ActiveTheme() Theme

Jump to

Keyboard shortcuts

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