Documentation
¶
Index ¶
- Variables
- func RunConfirm(prompt string) (bool, error)
- func RunConfirmWithOptions(prompt string, options ConfirmOptions) (bool, error)
- func RunSignIn(modelName, signInURL string) (string, error)
- func RunSpinner(message string) *launch.Spinner
- func RunUpgrade(modelName, requiredPlan string) (string, error)
- func SelectMultiple(title string, items []SelectItem, preChecked []string) ([]string, error)
- func SelectMultipleWithUpdates(title string, items []SelectItem, preChecked []string, ...) ([]string, error)
- func SelectSingle(title string, items []SelectItem, current string) (string, error)
- func SelectSingleWithUpdates(title string, items []SelectItem, current string, updates <-chan []SelectItem) (string, error)
- type ConfirmOptions
- type SelectItem
- type SelectorModel
- type TUIAction
- type TUIActionKind
Constants ¶
This section is empty.
Variables ¶
var ErrCancelled = launch.ErrCancelled
ErrCancelled is returned when the user cancels the selection.
Functions ¶
func RunConfirm ¶
RunConfirm shows a bubbletea yes/no confirmation prompt. Returns true if the user confirmed, false if cancelled.
func RunConfirmWithOptions ¶ added in v0.20.5
func RunConfirmWithOptions(prompt string, options ConfirmOptions) (bool, error)
RunConfirmWithOptions shows a bubbletea yes/no confirmation prompt with optional custom button labels.
func RunSignIn ¶
RunSignIn shows a bubbletea sign-in dialog and polls until the user signs in or cancels.
func RunSpinner ¶ added in v0.32.0
RunSpinner runs a bubbletea spinner displaying message until the returned Spinner's Stop is called. Stop signals the program to quit and blocks until it has exited and cleared its line. If the user presses Ctrl+C while the spinner is running, Spinner.Cancelled() is closed so the caller can abort its wait; the program quits and the terminal is restored before Stop returns. RunSpinner returns nil when there is no interactive terminal, so launch.StartSpinner can fall back to its ANSI spinner for headless/--yes runs.
func RunUpgrade ¶ added in v0.23.2
RunUpgrade shows a bubbletea upgrade dialog and polls until the user's plan is updated or cancelled.
func SelectMultiple ¶
func SelectMultiple(title string, items []SelectItem, preChecked []string) ([]string, error)
func SelectMultipleWithUpdates ¶ added in v0.23.2
func SelectMultipleWithUpdates(title string, items []SelectItem, preChecked []string, updates <-chan []SelectItem) ([]string, error)
func SelectSingle ¶
func SelectSingle(title string, items []SelectItem, current string) (string, error)
func SelectSingleWithUpdates ¶ added in v0.23.2
func SelectSingleWithUpdates(title string, items []SelectItem, current string, updates <-chan []SelectItem) (string, error)
Types ¶
type ConfirmOptions ¶ added in v0.20.5
type ConfirmOptions = launch.ConfirmOptions
type SelectItem ¶
func ConvertItems ¶
func ConvertItems(items []launch.SelectionItem) []SelectItem
ConvertItems converts launch.SelectionItem slice to SelectItem slice.
func ReorderItems ¶
func ReorderItems(items []SelectItem) []SelectItem
ReorderItems returns a copy with recommended items first, then non-recommended, preserving relative order within each group. This ensures the data order matches the visual section layout (Recommended / More).
type SelectorModel ¶ added in v0.32.0
type SelectorModel = selectorModel
func NewModelSelectorModel ¶ added in v0.32.0
func NewModelSelectorModel(title string, items []SelectItem, current, filter string) SelectorModel
func NewSelectorModel ¶ added in v0.32.0
func NewSelectorModel(title string, items []SelectItem, current string) SelectorModel
type TUIAction ¶ added in v0.18.0
type TUIAction struct {
Kind TUIActionKind
Integration string
ForceConfigure bool
}
func (TUIAction) IntegrationLaunchRequest ¶ added in v0.18.0
func (a TUIAction) IntegrationLaunchRequest() launch.IntegrationLaunchRequest
func (TUIAction) LastSelection ¶ added in v0.18.0
func (TUIAction) RunModelRequest ¶ added in v0.18.0
func (a TUIAction) RunModelRequest() launch.RunModelRequest
type TUIActionKind ¶ added in v0.18.0
type TUIActionKind int
const ( TUIActionNone TUIActionKind = iota TUIActionRunModel TUIActionLaunchIntegration )