interactive

package
v2.0.14 Latest Latest
Warning

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

Go to latest
Published: May 24, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const REVIEWERS_HISTORY_FILE = "reviewers.history"

Variables

This section is empty.

Functions

func ConfirmOrDie added in v2.0.13

func ConfirmOrDie(appConfig util.AppConfig, prompt string)

func GetCommitSelection

func GetCommitSelection(stdIo util.StdIo, options CommitSelectionOptions) ([]templates.GitLog, error)

Returns an empty array if user cancelled.

func GetTableSelection

func GetTableSelection(
	prompt string,
	columns []string,
	rows [][]string,
	multiselect bool,
	stdIo util.StdIo,
	rowEnabled func(row int) bool,
) []int

Returns empty selection if the user cancelled.

func InteractiveEnabled added in v2.0.13

func InteractiveEnabled(appConfig util.AppConfig) bool

func NewMessageKey

func NewMessageKey(keyType tea.KeyType) tea.KeyMsg

Convienience method for creating a message for when user hits a non-rune key like enter or up/down.

func NewMessageRune

func NewMessageRune(r rune) tea.KeyMsg

Convienience method for creating a message for when user typed a key.

func RequireInput added in v2.0.13

func RequireInput(t *testing.T)

func SendToProgram

func SendToProgram(programIndex int, messages ...tea.Msg)

Sends messages to the program. Each time [NewProgram] is called after SendToProgram programIndex is incremented. This is used instead of using stdin to avoid having to (somehow?) fake keyboard scan codes.

func UserSelection added in v2.0.13

func UserSelection(asyncConfig util.AsyncAppConfig) string

Types

type CommitSelectionOptions added in v2.0.13

type CommitSelectionOptions struct {
	CommitType  CommitType
	MultiSelect bool
	Prompt      string
}

type CommitType added in v2.0.13

type CommitType int
const (
	CommitTypePr CommitType = iota
	CommitTypeNoPr
	CommitTypeBoth
)

Jump to

Keyboard shortcuts

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