commitselect

package
v0.0.0-...-edbbb69 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbortedMsg

type AbortedMsg struct{}

AbortedMsg is sent when the user aborts the selection.

type Model

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

Model is the commit select view for picking a target commit.

func New

func New(commits []git.LogEntry, tokens theme.Tokens, width, height int) Model

New creates a new commit select model.

func (Model) Aborted

func (m Model) Aborted() bool

Aborted returns whether the user aborted.

func (Model) Done

func (m Model) Done() bool

Done returns whether the selection is complete.

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model.

func (*Model) SetSize

func (m *Model) SetSize(width, height int)

SetSize updates the view dimensions.

func (Model) Update

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

Update implements tea.Model.

func (Model) View

func (m Model) View() string

View implements tea.Model.

type OpenCommitSelectMsg

type OpenCommitSelectMsg struct {
	Commits []git.LogEntry
}

OpenCommitSelectMsg triggers opening the commit select view at the app level.

type SelectedMsg

type SelectedMsg struct {
	Hash     string   // abbreviated commit hash (backward compat)
	FullHash string   // full 40-char commit hash (backward compat)
	Subject  string   // commit subject line (backward compat)
	Hashes   []string // all selected full hashes (for multi-select)
	Subjects []string // all selected subjects (for multi-select)
}

SelectedMsg is sent when the user selects a commit.

type YankMsg

type YankMsg struct {
	Text string
}

YankMsg is sent when hashes should be copied to clipboard.

Jump to

Keyboard shortcuts

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