tui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BranchActionNameList  = "branchList"
	BranchActionNameNew   = "branchNew"
	BranchActionNameMerge = "branchMerge"
	BranchActionNamePrune = "branchPrune"

	BranchTableHeaderColor = lipgloss.Color("63")
)
View Source
const (
	IssueActionNameStart = "issueStart"
	IssueActionNameList  = "issueList"
	IssueActionNameClose = "issueClose"
)

Variables

This section is empty.

Functions

func BranchActionSelect

func BranchActionSelect(action *string) *huh.Group

BranchActionSelect presents the list of available branch actions.

func BranchPruneConfirm

func BranchPruneConfirm(nDeleted, nMerged int, confirmed *bool) *huh.Group

BranchPruneConfirm asks whether to proceed with pruning nDeleted deleted and nMerged merged branch records.

func BranchStatusFilter

func BranchStatusFilter(status *string, selected string) *huh.Group

BranchStatusFilter presents a status filter for the branch list. selected is the pre-selected value ("in_progress", "merged", or "all"); defaults to "in_progress" when empty.

func BranchTableModel added in v0.3.0

func BranchTableModel(rows []store.BranchRow) (tea.Model, error)

func CommitMessageGroup

func CommitMessageGroup(commitTypes []config.CommitTypeOption, items []config.CommitItem, selectedType *string) *huh.Group

CommitMessageGroup builds the first commit form group. The type select is always first, populated from commitTypes and writing into selectedType. Remaining fields come from items (scope, subject, body, footer).

func CommitOptionsGroup

func CommitOptionsGroup(opt *CommitOption) *huh.Group

CommitOptionsGroup builds the second commit form group (author + commit flags). opt is written directly by the form fields.

func IssueActionSelect

func IssueActionSelect(action *string) *huh.Group

IssueActionSelect presents the list of available issue actions.

func IssueConfirm

func IssueConfirm(confirmTitle string, confirmed *bool) *huh.Group

func IssueInput

func IssueInput(issueID, title, branchType *string, allowedBranchTypes []string) *huh.Group

func IssueStatusFilter added in v0.3.0

func IssueStatusFilter(status *string, selected string) *huh.Group

IssueStatusFilter presents a status filter for the issue list. selected is the pre-selected value ("open", "closed", "all"); defaults to "open" when empty.

func IssueStatusPicker added in v0.2.0

func IssueStatusPicker(issueID, trackerType string, statuses []string, selected *string) *huh.Group

IssueStatusPicker lets the user pick a new status from the live list, or skip the update entirely. selected is set to the chosen status name, or to issueStatusSkip ("") when the user chooses to skip.

func IssueTableModel added in v0.3.0

func IssueTableModel(rows []store.IssueRow) (tea.Model, error)

func IssueTrackerError

func IssueTrackerError(msg string) *huh.Group

IssueTrackerError shows an error note with a "Continue with manual input" button.

func IssueTrackerPicker

func IssueTrackerPicker(
	issues []tracker.Issue,
	selected *tracker.Issue,
	branchTypes []string,
	branchType *string) *huh.Group

IssueTrackerPicker shows the live issue list and branch type selector.

func IssueTrackerToggle

func IssueTrackerToggle(useTracker *bool, trackerFirst bool, trackerType string) *huh.Group

IssueTrackerToggle asks whether to fetch issues from the tracker. trackerFirst=true pre-selects YES (used for `issue start`); trackerFirst=false pre-selects NO (used for `branch new`).

Types

type CommitOption

type CommitOption struct {
	Authors    []string
	Author     string
	All        bool
	Amend      bool
	NoVerify   bool
	Signoff    bool
	AllowEmpty bool
}

CommitOption holds commit option values for the commit options group of the TUI. Used both as flag-derived defaults (input) and as user selections (output).

func (CommitOption) AnyOptionSet

func (o CommitOption) AnyOptionSet() bool

AnyOptionSet reports true if any commit-option flag was passed. When true, the CommitOptionsGroup of the TUI should be skipped.

Jump to

Keyboard shortcuts

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