tui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunDashboard

func RunDashboard(store *wizctx.Store, interval time.Duration) error

RunDashboard launches the dashboard TUI.

Types

type Action

type Action int

Action is what the user chose to do in the picker.

const (
	ActionNone Action = iota
	ActionEnter
	ActionSpawn
	ActionDelete
	ActionCreate
)

type ContextStatus

type ContextStatus struct {
	Context    wizctx.Context
	Status     *gitx.RepoStatus
	Error      error
	IndexMtime int64
}

ContextStatus holds a context plus its live git status.

type DashboardModel

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

DashboardModel is the Bubble Tea model for the watch dashboard.

func NewDashboard

func NewDashboard(store *wizctx.Store, interval time.Duration) DashboardModel

NewDashboard creates a new dashboard model.

func (DashboardModel) Init

func (m DashboardModel) Init() tea.Cmd

func (DashboardModel) Update

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

func (DashboardModel) View

func (m DashboardModel) View() string

type Model

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

Model is the Bubble Tea model for the context picker.

func NewPicker

func NewPicker(contexts []wizctx.Context) Model

NewPicker creates a new picker model.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Result

func (m Model) Result() Result

Result returns the picker result. Call after tea.Program finishes.

func (Model) Update

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

func (Model) View

func (m Model) View() string

type Result

type Result struct {
	Action  Action
	Context *wizctx.Context
}

Result holds the picker outcome.

func Run

func Run(contexts []wizctx.Context) (Result, error)

Run launches the TUI picker and returns the result.

Jump to

Keyboard shortcuts

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