components

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputModel

type InputModel struct {
	Model       *editline.Model
	HistoryFile string
}

InputModel wraps the editline component.

func NewInputModel

func NewInputModel(prompt, historyFile string, pgKeywords []string, style string) (*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 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 {
	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.

Jump to

Keyboard shortcuts

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