app

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package app provides the main application UI and logic using Bubble Tea.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetIconProvider added in v1.27.0

func SetIconProvider(p IconProvider)

SetIconProvider sets the current icon provider.

Types

type EmojiProvider added in v1.27.0

type EmojiProvider struct{}

EmojiProvider implements IconProvider using emojis.

func (*EmojiProvider) GetCIIcon added in v1.27.0

func (p *EmojiProvider) GetCIIcon(conclusion string) string

GetCIIcon returns the CI status icon for the given conclusion.

func (*EmojiProvider) GetFileIcon added in v1.27.0

func (p *EmojiProvider) GetFileIcon(name string, isDir bool) string

GetFileIcon returns the file icon for the given name and type.

func (*EmojiProvider) GetIssueIcon added in v1.27.0

func (p *EmojiProvider) GetIssueIcon() string

GetIssueIcon returns the issue icon.

func (*EmojiProvider) GetPRIcon added in v1.27.0

func (p *EmojiProvider) GetPRIcon() string

GetPRIcon returns the PR icon.

func (*EmojiProvider) GetUIIcon added in v1.27.0

func (p *EmojiProvider) GetUIIcon(icon UIIcon) string

GetUIIcon returns the UI icon for the given identifier.

type IconProvider added in v1.27.0

type IconProvider interface {
	GetFileIcon(name string, isDir bool) string
	GetPRIcon() string
	GetIssueIcon() string
	GetCIIcon(conclusion string) string
	GetUIIcon(icon UIIcon) string
}

IconProvider defines the interface for providing icons.

type Model

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

Model represents the main application model

func NewModel

func NewModel(cfg *config.AppConfig, initialFilter string) *Model

NewModel creates a new application model with the given configuration. initialFilter is an optional filter string to apply on startup.

func (*Model) Close

func (m *Model) Close()

Close releases background resources including canceling contexts and timers. It also persists the current selection for the next session.

func (*Model) GetSelectedPath

func (m *Model) GetSelectedPath() string

GetSelectedPath returns the selected worktree path for shell integration. This is used when the application exits to allow the shell to cd into the selected worktree.

func (*Model) Init

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

Init satisfies the tea.Model interface and starts with no command.

func (*Model) Update

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

Update processes Bubble Tea messages and routes them through the app model.

func (*Model) UpdateTheme added in v1.22.0

func (m *Model) UpdateTheme(themeName string)

UpdateTheme refreshes UI styles for the selected theme.

func (*Model) View

func (m *Model) View() string

View renders the active screen for the Bubble Tea program.

type NerdFontV3Provider added in v1.27.0

type NerdFontV3Provider struct{}

NerdFontV3Provider implements IconProvider for Nerd Font v3.

func (*NerdFontV3Provider) GetCIIcon added in v1.27.0

func (p *NerdFontV3Provider) GetCIIcon(conclusion string) string

GetCIIcon returns the CI status icon for the given conclusion.

func (*NerdFontV3Provider) GetFileIcon added in v1.27.0

func (p *NerdFontV3Provider) GetFileIcon(name string, isDir bool) string

GetFileIcon returns the file icon for the given name and type.

func (*NerdFontV3Provider) GetIssueIcon added in v1.27.0

func (p *NerdFontV3Provider) GetIssueIcon() string

GetIssueIcon returns the issue icon.

func (*NerdFontV3Provider) GetPRIcon added in v1.27.0

func (p *NerdFontV3Provider) GetPRIcon() string

GetPRIcon returns the PR icon.

func (*NerdFontV3Provider) GetUIIcon added in v1.27.0

func (p *NerdFontV3Provider) GetUIIcon(icon UIIcon) string

GetUIIcon returns the UI icon for the given identifier.

type StatusFile added in v1.15.0

type StatusFile = models.StatusFile

StatusFile represents a file entry from git status.

type StatusTreeNode added in v1.17.0

type StatusTreeNode = services.StatusTreeNode

StatusTreeNode represents a node in the status file tree (directory or file).

type TextProvider added in v1.27.0

type TextProvider struct{}

TextProvider implements IconProvider using simple Unicode-safe characters.

func (*TextProvider) GetCIIcon added in v1.27.0

func (p *TextProvider) GetCIIcon(conclusion string) string

GetCIIcon returns the CI status icon for the given conclusion.

func (*TextProvider) GetFileIcon added in v1.27.0

func (p *TextProvider) GetFileIcon(name string, isDir bool) string

GetFileIcon returns the file icon for the given name and type.

func (*TextProvider) GetIssueIcon added in v1.27.0

func (p *TextProvider) GetIssueIcon() string

GetIssueIcon returns the issue icon.

func (*TextProvider) GetPRIcon added in v1.27.0

func (p *TextProvider) GetPRIcon() string

GetPRIcon returns the PR icon.

func (*TextProvider) GetUIIcon added in v1.27.0

func (p *TextProvider) GetUIIcon(icon UIIcon) string

GetUIIcon returns the UI icon for the given identifier.

type UIIcon added in v1.27.0

type UIIcon int

UIIcon identifies UI-specific icons that follow the selected icon set.

const (
	UIIconHelpTitle UIIcon = iota
	UIIconNavigation
	UIIconStatusPane
	UIIconLogPane
	UIIconCommitTree
	UIIconWorktreeActions
	UIIconBranchNaming
	UIIconViewingTools
	UIIconRepoOps
	UIIconBackgroundRefresh
	UIIconFilterSearch
	UIIconStatusIndicators
	UIIconHelpNavigation
	UIIconShellCompletion
	UIIconConfiguration
	UIIconIconConfiguration
	UIIconTip
	UIIconSearch
	UIIconFilter
	UIIconZoom
	UIIconBot
	UIIconThemeSelect
	UIIconPRSelect
	UIIconIssueSelect
	UIIconCICheck
	UIIconWorktreeMain
	UIIconWorktree
	UIIconStatusClean
	UIIconStatusDirty
	UIIconSyncClean
	UIIconAhead
	UIIconBehind
	UIIconArrowLeft
	UIIconArrowRight
	UIIconDisclosureOpen
	UIIconDisclosureClosed
	UIIconSpinnerFilled
	UIIconSpinnerEmpty
	UIIconPRStateOpen
	UIIconPRStateMerged
	UIIconPRStateClosed
	UIIconPRStateUnknown
)

UIIcon values map UI elements to icon set glyphs.

Directories

Path Synopsis
Package screen provides a unified screen management system for modal overlays.
Package screen provides a unified screen management system for modal overlays.

Jump to

Keyboard shortcuts

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