tui

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StatusStyle

func StatusStyle(status string) lipgloss.Style

StatusStyle returns a lipgloss style colored for the given status string.

Types

type App

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

App is the root Bubble Tea model that wires all views together. It implements a three-state layout machine:

  • Split view (default): agents table on left (~35%) + preview pane on right (~65%)
  • Zoomed session: full-screen interactive PTY
  • Sub-views: costs, teams, help (full-screen, non-interactive)

func NewApp

func NewApp() App

NewApp creates a new root TUI application.

func (App) Init

func (a App) Init() tea.Cmd

func (App) Update

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

func (App) View

func (a App) View() string

type Layout

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

Layout manages split pane dimensions and zoom state for the TUI.

func NewLayout

func NewLayout(w, h int) *Layout

NewLayout creates a new Layout with the given dimensions.

func (*Layout) ContentHeight

func (l *Layout) ContentHeight(headerHeight int) int

ContentHeight returns the available height for content after subtracting the header and one line for the status bar.

func (*Layout) Height

func (l *Layout) Height() int

Height returns the current layout height.

func (*Layout) IsZoomed

func (l *Layout) IsZoomed() bool

IsZoomed returns whether a pane is currently zoomed.

func (*Layout) SetSize

func (l *Layout) SetSize(w, h int)

SetSize updates the layout dimensions.

func (*Layout) SetZoomed

func (l *Layout) SetZoomed(z bool)

SetZoomed sets the zoom state.

func (*Layout) SplitVertical

func (l *Layout) SplitVertical(percent int) (left, right int)

SplitVertical divides the width at the given percentage, returning left and right widths.

func (*Layout) Width

func (l *Layout) Width() int

Width returns the current layout width.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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