tui

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 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

Overview

Package tui is the router panel: a Bubble Tea program over the control sockets of every registry endpoint, with a Sessions tab and per-session tabs Now, Routes, Policy, Classifier and Usage. It punctuates and wraps a decision's support fragments itself, shows an engine older than them as the one Support line it sends, and wraps a fragment wider than the panel onto the lines under the lead rather than cutting it. RenderFleetView is pure so docs images can be produced from fixture data.

Index

Constants

This section is empty.

Variables

Presets lists the policy presets in cycling order.

Tabs lists the views in display order.

Functions

func RenderFleetView added in v0.3.0

func RenderFleetView(v FleetView) string

RenderFleetView draws v with ANSI colors. Output depends only on v.

func Run

func Run(ctx context.Context, o Options) error

Run shows the panel until the user quits or ctx ends. It redials lost endpoints while their registry entries remain.

Types

type FleetView added in v0.3.0

type FleetView struct {
	Homes    []home.Home
	Sessions []route.SessionInfo
	Brains   map[string]time.Duration
	Waiting  map[string][]string
	Focus    string
	Snap     route.Snapshot // the focused session's snapshot
	Tab      Tab
	Width    int
	Height   int
	Help     bool
	Popover  bool // the pin popover is open
	Locked   bool // a panel run with --session: no list
}

FleetView is what RenderFleetView draws for the docs images. Each session is on its own endpoint, as stage 1 launchers run them, unless its home is in Brains: then one brain serves the home, and the value is how long it has run. Waiting lists, by home id, the labels of routers whose Codex has not sent a prompt yet.

type Options

type Options struct {
	Socket   string
	Registry string
	Session  string
	NoMouse  bool
}

Options configure Run. Socket, when set, shows that one endpoint and skips the registry; else the panel watches the registry dir Registry. Session, when set, locks the panel to that session id; else it shows all. NoMouse leaves the mouse to the terminal, so text selection works.

type Tab

type Tab string

Tab is one panel view. Tab and shift+tab cycle them.

const (
	TabSessions Tab = "sessions"
	TabPolicy   Tab = "policy"
	TabUsage    Tab = "usage"
)

Jump to

Keyboard shortcuts

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