Documentation
¶
Index ¶
- type InputModel
- func (m *InputModel) AddHistoryEntry(entry string)
- func (m *InputModel) Init() tea.Cmd
- func (m *InputModel) Prompt() string
- func (m *InputModel) Reset()
- func (m *InputModel) SaveHistory() error
- func (m *InputModel) SetPrompt(prompt string)
- func (m *InputModel) SetSize(width, height int)
- func (m *InputModel) Update(msg tea.Msg) (InputModel, tea.Cmd)
- func (m *InputModel) Value() string
- func (m *InputModel) View() string
- type MessageResetMsg
- type MessageUpdateMsg
- type SpinnerModel
- type StatusModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InputModel ¶
InputModel wraps the editline component.
func NewInputModel ¶
func NewInputModel(prompt, historyFile string, style string, autoCompleter editline.AutoCompleteFn) (*InputModel, error)
NewInputModel creates and configures the input model.
func (*InputModel) AddHistoryEntry ¶
func (m *InputModel) AddHistoryEntry(entry string)
func (*InputModel) Init ¶
func (m *InputModel) Init() tea.Cmd
func (*InputModel) Prompt ¶
func (m *InputModel) Prompt() string
func (*InputModel) Reset ¶
func (m *InputModel) Reset()
func (*InputModel) SaveHistory ¶
func (m *InputModel) SaveHistory() error
func (*InputModel) SetPrompt ¶
func (m *InputModel) SetPrompt(prompt string)
func (*InputModel) SetSize ¶
func (m *InputModel) SetSize(width, height int)
func (*InputModel) Update ¶
func (m *InputModel) Update(msg tea.Msg) (InputModel, tea.Cmd)
func (*InputModel) Value ¶
func (m *InputModel) Value() string
func (*InputModel) View ¶
func (m *InputModel) View() string
type MessageResetMsg ¶ added in v0.3.1
type MessageResetMsg struct{}
MessageResetMsg is used to reset the message in the status bar
type MessageUpdateMsg ¶ added in v0.3.1
type MessageUpdateMsg struct {
Message string
}
MessageUpdateMsg is used to update the message in the status bar
type SpinnerModel ¶
type SpinnerModel struct {
// contains filtered or unexported fields
}
func NewSpinnerModel ¶
func NewSpinnerModel(spinnerStyle, captionStyle lipgloss.Style) SpinnerModel
func (SpinnerModel) Init ¶
func (m SpinnerModel) Init() tea.Cmd
func (SpinnerModel) Tick ¶
func (m SpinnerModel) Tick() tea.Cmd
func (SpinnerModel) Update ¶
func (m SpinnerModel) Update(msg tea.Msg) (SpinnerModel, tea.Cmd)
func (SpinnerModel) View ¶
func (m SpinnerModel) View() string
type StatusModel ¶
type StatusModel struct {
Message string
Version string
Width int
IssueLink string
SeparatorStyle lipgloss.Style
StatusBarStyle lipgloss.Style
}
StatusModel manages the status bar and the executing spinner
func NewStatusModel ¶
func NewStatusModel(version, issueLink string) StatusModel
func (StatusModel) Init ¶
func (m StatusModel) Init() tea.Cmd
func (StatusModel) StaticHeight ¶
func (m StatusModel) StaticHeight() int
StaticHeight returns the height of the footer.
func (StatusModel) Update ¶
func (m StatusModel) Update(msg tea.Msg) (StatusModel, tea.Cmd)
func (StatusModel) View ¶
func (m StatusModel) View() string
ViewFooter returns the static footer with separator and status bar.
Click to show internal directories.
Click to hide internal directories.