tui

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package tui implements the Bubble Tea UI for streaming completions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Yai

type Yai struct {
	// Output is populated at the end of a run for non-raw output printing.
	Output string
	Input  string
	Styles present.Styles
	Error  *errs.Error

	Config *config.Config
	// contains filtered or unexported fields
}

Yai is the Bubble Tea model that manages reading stdin and streaming LLM output.

func NewYai

func NewYai(
	ctx context.Context,
	r *lipgloss.Renderer,
	cfg *config.Config,
	agentSvc *agent.Service,
) *Yai

NewYai creates the Bubble Tea model used for interactive streaming output.

func (*Yai) GlamourOutput

func (m *Yai) GlamourOutput() string

GlamourOutput returns the last rendered formatted output.

func (*Yai) Init

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

Init implements tea.Model.

func (*Yai) Messages

func (m *Yai) Messages() []proto.Message

Messages returns the message list built/received during streaming.

func (*Yai) Update

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

Update implements tea.Model.

func (*Yai) View

func (m *Yai) View() string

View implements tea.Model.

Jump to

Keyboard shortcuts

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