app

package
v0.1.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyMap

type KeyMap struct {
	Quit     key.Binding
	Help     key.Binding
	NextTab  key.Binding
	PrevTab  key.Binding
	Refresh  key.Binding
	Up       key.Binding
	Down     key.Binding
	PageUp   key.Binding
	PageDown key.Binding
	Home     key.Binding
	End      key.Binding
	Enter    key.Binding
	Back     key.Binding

	// Mnemonic tab shortcuts — each maps to the shortcut shown in the tab bar.
	// These are only active when no view is capturing text input.
	TabStatus    key.Binding // s (but note: views may also use 's' for stage)
	TabDiff      key.Binding // d
	TabLog       key.Binding // l
	TabBranches  key.Binding // b
	TabRemotes   key.Binding // m  (r is taken by refresh)
	TabStash     key.Binding // t
	TabRebase    key.Binding // e
	TabConflicts key.Binding // x
	TabWorktrees key.Binding // w
	TabBisect    key.Binding // i
}

KeyMap defines the global keybindings used across the application. Tab switching uses mnemonic single-key shortcuts that match the tab's first letter (or a memorable alternative when there's a conflict).

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default keybindings.

Tab switching uses ←/→ arrow keys (and h/l for vim users). The Tab key is deliberately NOT used here so it can fall through to views for pane-focus switching (e.g. file list ↔ diff preview in StatusView). Alt+key shortcuts allow direct jumps to specific tabs.

type Model

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

Model is the top-level Bubbletea model that orchestrates tabs and views.

func New

func New(gitSvc git.Service, cfg *config.Config, views map[common.TabID]common.View) Model

New creates a new application model.

func (Model) Init

func (m Model) Init() tea.Cmd

Init initialises the active view and triggers the first status bar refresh.

func (Model) Update

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

Update processes messages.

func (Model) View

func (m Model) View() string

View renders the entire UI. This is a pure function — no I/O.

Jump to

Keyboard shortcuts

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