Documentation
¶
Index ¶
- Variables
- func ErrCmd(err error) tea.Cmd
- func NewLegacyPromptModel(title string, items []string) *selection.Model[string]
- func RenderError(err error) string
- func RunBubbleTea(model BubbleTeaModelWithExitHandling) error
- type BaseStackedView
- type BubbleTeaModelWithExitHandling
- type NewlineModel
- type PromptModel
- type SimpleCommandMsg
- type SimpleMessageView
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoGitHubToken = errors.Sentinel("No GitHub token is set (do you need to configure one?).") ErrParentNotAdopted = errors.Sentinel("Parent not adopted") )
View Source
var PromptKeys = []key.Binding{ key.NewBinding( key.WithKeys("up", "k", "ctrl+p"), key.WithHelp("↑/k", "move up"), ), key.NewBinding( key.WithKeys("down", "j", "ctrl+n"), key.WithHelp("↓/j", "move down"), ), key.NewBinding( key.WithKeys("space", "enter"), key.WithHelp("space/enter", "select"), ), key.NewBinding( key.WithKeys("ctrl+c"), key.WithHelp("ctrl+c", "cancel"), ), }
Functions ¶
func ErrCmd ¶ added in v0.1.12
ErrCmd wraps an error into a tea.Cmd that returns the error as a message.
Throughout the application, we capture error as a message and use it as a mean to halt the application. This is a convenience function to trigger that behavior.
func NewLegacyPromptModel ¶ added in v0.1.12
func RenderError ¶ added in v0.1.14
func RunBubbleTea ¶ added in v0.0.40
func RunBubbleTea(model BubbleTeaModelWithExitHandling) error
Types ¶
type BaseStackedView ¶ added in v0.1.14
type BaseStackedView struct {
Err error
// contains filtered or unexported fields
}
func (*BaseStackedView) AddView ¶ added in v0.1.14
func (vm *BaseStackedView) AddView(m tea.Model) tea.Cmd
func (*BaseStackedView) Init ¶ added in v0.1.14
func (vm *BaseStackedView) Init() tea.Cmd
func (*BaseStackedView) Update ¶ added in v0.1.14
func (vm *BaseStackedView) Update(msg tea.Msg) tea.Cmd
func (*BaseStackedView) View ¶ added in v0.1.14
func (vm *BaseStackedView) View() string
type BubbleTeaModelWithExitHandling ¶ added in v0.0.40
type NewlineModel ¶ added in v0.1.12
func (*NewlineModel) Init ¶ added in v0.1.12
func (m *NewlineModel) Init() tea.Cmd
func (*NewlineModel) View ¶ added in v0.1.12
func (m *NewlineModel) View() string
type PromptModel ¶ added in v0.1.12
type PromptModel struct {
// contains filtered or unexported fields
}
func NewPromptModel ¶
func (*PromptModel) Init ¶ added in v0.1.12
func (m *PromptModel) Init() tea.Cmd
func (*PromptModel) View ¶ added in v0.1.12
func (m *PromptModel) View() string
type SimpleCommandMsg ¶ added in v0.1.14
type SimpleMessageView ¶ added in v0.1.12
type SimpleMessageView struct {
Message string
}
func (SimpleMessageView) Init ¶ added in v0.1.12
func (s SimpleMessageView) Init() tea.Cmd
func (SimpleMessageView) View ¶ added in v0.1.12
func (s SimpleMessageView) View() string
Click to show internal directories.
Click to hide internal directories.