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 ¶
This section is empty.
Types ¶
type CommandPaletteScreen ¶
type CommandPaletteScreen struct {
// contains filtered or unexported fields
}
CommandPaletteScreen lets the user pick a command from a filtered list.
func NewCommandPaletteScreen ¶
func NewCommandPaletteScreen(items []paletteItem) *CommandPaletteScreen
NewCommandPaletteScreen builds a palette populated with candidate commands.
func (*CommandPaletteScreen) Init ¶
func (s *CommandPaletteScreen) Init() tea.Cmd
Init configures the palette input before Bubble Tea updates begin.
func (*CommandPaletteScreen) Selected ¶
func (s *CommandPaletteScreen) Selected() (string, bool)
Selected reports the current palette selection if one exists.
func (*CommandPaletteScreen) View ¶
func (s *CommandPaletteScreen) View() string
View displays the palette items and current filter text.
type CommitScreen ¶
type CommitScreen struct {
// contains filtered or unexported fields
}
CommitScreen displays metadata, stats, and diff details for a single commit.
func NewCommitScreen ¶
func NewCommitScreen(meta commitMeta, stat, diff string, useDelta bool) *CommitScreen
NewCommitScreen configures the commit detail viewer for the selected SHA.
func (*CommitScreen) Init ¶
func (s *CommitScreen) Init() tea.Cmd
Init satisfies tea.Model.Init for the commit detail view.
type ConfirmScreen ¶
type ConfirmScreen struct {
// contains filtered or unexported fields
}
ConfirmScreen displays a modal confirmation prompt with Accept/Cancel buttons.
func NewConfirmScreen ¶
func NewConfirmScreen(message string) *ConfirmScreen
NewConfirmScreen creates a confirm screen preloaded with a message.
func (*ConfirmScreen) Init ¶
func (s *ConfirmScreen) Init() tea.Cmd
Init implements the tea.Model Init stage for ConfirmScreen.
func (*ConfirmScreen) View ¶
func (s *ConfirmScreen) View() string
View renders the confirmation UI box with focused button highlighting.
type DiffScreen ¶
type DiffScreen struct {
// contains filtered or unexported fields
}
DiffScreen renders a full commit diff inside a viewport.
func NewDiffScreen ¶
func NewDiffScreen(title, diff string) *DiffScreen
NewDiffScreen displays a commit diff title and body inside a viewport.
func (*DiffScreen) Init ¶
func (s *DiffScreen) Init() tea.Cmd
Init sets up the diff viewport state before rendering.
func (*DiffScreen) View ¶
func (s *DiffScreen) View() string
View renders the diff text inside a scrollable viewport.
type HelpScreen ¶
type HelpScreen struct {
// contains filtered or unexported fields
}
HelpScreen renders searchable documentation for the app controls.
func NewHelpScreen ¶
func NewHelpScreen(maxWidth, maxHeight int) *HelpScreen
NewHelpScreen initializes help content with the available screen size.
func (*HelpScreen) Init ¶
func (s *HelpScreen) Init() tea.Cmd
Init prepares the help screen before it starts handling updates.
func (*HelpScreen) SetSize ¶
func (s *HelpScreen) SetSize(maxWidth, maxHeight int)
SetSize updates the help screen dimensions (useful on terminal resize)
func (*HelpScreen) View ¶
func (s *HelpScreen) View() string
View renders the help content and search input inside the viewport.
type InputScreen ¶
type InputScreen struct {
// contains filtered or unexported fields
}
InputScreen provides a prompt along with a text input and inline validation.
func NewInputScreen ¶
func NewInputScreen(prompt, placeholder, value string) *InputScreen
NewInputScreen builds an input modal with prompt, placeholder, and initial value.
func (*InputScreen) Init ¶
func (s *InputScreen) Init() tea.Cmd
Init satisfies tea.Model.Init for the input modal.
func (*InputScreen) SetValidation ¶
func (s *InputScreen) SetValidation(fn func(string) string)
SetValidation adds an optional validation callback for input submission.
func (*InputScreen) Update ¶
Update handles keystrokes for the input modal and returns commands on submit.
func (*InputScreen) View ¶
func (s *InputScreen) View() string
View renders the prompt, input field, and error message inside a styled box.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the main application model
func (*Model) Close ¶
func (m *Model) Close()
Close releases background resources (cancel contexts, timers)
func (*Model) GetSelectedPath ¶
GetSelectedPath returns the selected worktree path (for shell integration)
type TrustScreen ¶
type TrustScreen struct {
// contains filtered or unexported fields
}
TrustScreen surfaces trust warnings and records commands for a path.
func NewTrustScreen ¶
func NewTrustScreen(filePath string, commands []string) *TrustScreen
NewTrustScreen warns the user when a repo config has changed or is untrusted.
func (*TrustScreen) Init ¶
func (s *TrustScreen) Init() tea.Cmd
Init satisfies tea.Model.Init for the trust confirmation screen.
func (*TrustScreen) View ¶
func (s *TrustScreen) View() string
View renders the trust warning content inside a styled box.
type WelcomeScreen ¶
type WelcomeScreen struct {
// contains filtered or unexported fields
}
WelcomeScreen shows the initial instructions when no worktrees are open.
func NewWelcomeScreen ¶
func NewWelcomeScreen(currentDir, worktreeDir string) *WelcomeScreen
NewWelcomeScreen builds the greeting screen shown when no worktrees exist.
func (*WelcomeScreen) Init ¶
func (s *WelcomeScreen) Init() tea.Cmd
Init is part of the tea.Model interface for the welcome screen.
func (*WelcomeScreen) View ¶
func (s *WelcomeScreen) View() string
View renders the welcome dialog with guidance and action buttons.