tui

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(opts Options) error

Run starts the TUI application

Types

type AppState

type AppState int

AppState represents the current state of the application

const (
	StateLoading AppState = iota
	StateDirtyRepoChoice
	StateCommitMessage
	StateStashMessage
	StateExecutingGitCommand
	StateSelectAction
	StateSelectPRType
	StateConfirmTag
	StateEditTagComment
	StateExecutingTag
	StateConfirmPush
	StateExecutingPush
	StateUndoPreview // consolidated undo screen with tag list and scope selection
	StateConfirmUndo
	StateExecutingUndo
	StateCustomTag // custom version input for first tag
	StateDone
	StateError
)

type KeyMap

type KeyMap struct {
	Up     key.Binding
	Down   key.Binding
	Select key.Binding
	Back   key.Binding
	Quit   key.Binding
}

KeyMap defines all key bindings for the application

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default key bindings

func (KeyMap) ConfirmHelp

func (k KeyMap) ConfirmHelp() string

ConfirmHelp returns help for confirmation screens

func (KeyMap) DoneHelp

func (k KeyMap) DoneHelp() string

DoneHelp returns help for done/error screens

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

FullHelp returns key bindings for the full help view

func (KeyMap) InputHelp

func (k KeyMap) InputHelp() string

InputHelp returns help for text input screens

func (KeyMap) ListHelp

func (k KeyMap) ListHelp() string

ListHelp returns help for list navigation screens

func (KeyMap) ListHelpWithBack

func (k KeyMap) ListHelpWithBack() string

ListHelpWithBack returns help for list screens that support going back

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

ShortHelp returns key bindings for the short help view

type Model

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

Model represents the application state

func NewModel

func NewModel(opts Options) Model

NewModel creates a new TUI model

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) Update

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

Update handles all messages and updates the model

func (Model) View

func (m Model) View() string

View renders the current state

type Options

type Options struct {
	Prefix string
}

Options represents command-line options

type TagInfo

type TagInfo struct {
	Name     string
	IsLocal  bool
	IsRemote bool
}

TagInfo represents a tag with its local/remote status

Jump to

Keyboard shortcuts

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