statusbar

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package statusbar renders the persistent top bar for the Tero app.

Index

Constants

View Source
const (
	TabPolicy  = 0
	TabCatalog = 1
	TabSync    = 2
)

Tab indices for the drawer.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model renders the app status bar.

func New

func New(theme styles.Theme, syncer powersync.Syncer, host string) *Model

New creates a new statusbar.

func (*Model) CloseDrawer

func (m *Model) CloseDrawer()

CloseDrawer closes the drawer.

func (*Model) DrawerView

func (m *Model) DrawerView(width, height int) string

DrawerView renders the drawer overlay.

func (*Model) Height

func (m *Model) Height() int

Height returns the height of the statusbar.

func (*Model) Init

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

Init initializes child models.

func (*Model) IsDrawerOpen

func (m *Model) IsDrawerOpen() bool

IsDrawerOpen returns whether the drawer is open.

func (*Model) NextTab

func (m *Model) NextTab()

NextTab cycles to the next drawer tab.

func (*Model) SetContextPercent

func (m *Model) SetContextPercent(percent int)

SetContextPercent sets the context window usage percentage.

func (*Model) SetDB

func (m *Model) SetDB(db sqlite.DB) tea.Cmd

SetDB sets the database for status polling.

func (*Model) SetOrg

func (m *Model) SetOrg(org string)

SetOrg sets the organization name.

func (*Model) SetTitle

func (m *Model) SetTitle(title string)

SetTitle sets the conversation title.

func (*Model) SetWidth

func (m *Model) SetWidth(width int)

SetWidth sets the statusbar width.

func (*Model) SetWorkspace

func (m *Model) SetWorkspace(workspace string)

SetWorkspace sets the workspace name.

func (*Model) ShortHelp

func (m *Model) ShortHelp() []key.Binding

ShortHelp returns keybindings shown in the keybar when the drawer is open.

func (*Model) ToggleDrawer

func (m *Model) ToggleDrawer()

ToggleDrawer toggles the drawer open/closed. Opening is suppressed until at least one tab has data.

func (*Model) Update

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

Update handles messages.

func (*Model) View

func (m *Model) View() string

View renders the statusbar.

Directories

Path Synopsis
Package catalogstatus renders the catalog health indicator in the status bar.
Package catalogstatus renders the catalog health indicator in the status bar.
Package policystatus renders the policy work indicator in the status bar.
Package policystatus renders the policy work indicator in the status bar.
Package syncstatus renders sync connection status.
Package syncstatus renders sync connection status.

Jump to

Keyboard shortcuts

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