tui

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatMessage

type ChatMessage struct {
	Role      string
	Content   string
	Name      string // tool name, for Role == "tool"
	Arguments string // marshaled call args, for Role == "tool"
	AgentID   string // issuing sub-agent, for Role == "tool" (empty = root agent)
}

ChatMessage represents a message in the chat history

type Model

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

Model represents the TUI state

func NewModel

func NewModel(ctx context.Context, cfg types.Config, height int, shellJobs *wizmcp.ShellJobs, p render.Presenter, transports ...mcp.Transport) Model

NewModel creates a new TUI model

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) Output

func (m Model) Output() string

Output returns any command that should be output to the shell

func (Model) SessionUsage added in v0.7.0

func (m Model) SessionUsage() chat.SessionUsage

SessionUsage reports what the session spent, for the exit summary RunTUI prints once the program has stopped rendering.

func (Model) Update

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

Update handles messages and updates the model

func (Model) View

func (m Model) View() string

View renders the TUI.

Directories

Path Synopsis
full
Package full implements render.Presenter for nib's full-screen surface: the alt-screen mode with mouse reporting enabled.
Package full implements render.Presenter for nib's full-screen surface: the alt-screen mode with mouse reporting enabled.
inline
Package inline implements render.Presenter for nib's default surface: the fzf-style inline widget that lives in the normal terminal scrollback (no alt screen, no mouse reporting).
Package inline implements render.Presenter for nib's default surface: the fzf-style inline widget that lives in the normal terminal scrollback (no alt screen, no mouse reporting).

Jump to

Keyboard shortcuts

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