Documentation
¶
Overview ¶
Package ui provides a user interface for searching.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunTemplatePicker ¶
RunTemplatePicker launches the interactive UI for selecting a markdown template. It returns the path to the chosen template or an error if none was selected.
Types ¶
type SearchModel ¶
type SearchModel struct {
// contains filtered or unexported fields
}
SearchModel represents the Bubble Tea state for the interactive search UI.
func NewSearchModel ¶
func NewSearchModel(idx bleve.Index, tagMode bool) SearchModel
NewSearchModel initializes a new SearchModel with the given index and mode.
func (SearchModel) Chosen ¶
func (m SearchModel) Chosen() string
Chosen returns the path of the selected note, or an empty string if none was selected.
func (SearchModel) Update ¶
Update implements tea.Model, handling keyboard events and search results.
func (SearchModel) View ¶
func (m SearchModel) View() string
View implements tea.Model, rendering the UI based on the current state.
type TemplatePickerModel ¶
type TemplatePickerModel struct {
// contains filtered or unexported fields
}
TemplatePickerModel represents the Bubble Tea state for the template selection UI.
func NewTemplatePicker ¶
func NewTemplatePicker(templatesDir string) (TemplatePickerModel, error)
NewTemplatePicker initializes the model with available markdown templates.
func (TemplatePickerModel) Init ¶
func (m TemplatePickerModel) Init() tea.Cmd
Init implements tea.Model.
func (TemplatePickerModel) View ¶
func (m TemplatePickerModel) View() string
View implements tea.Model, rendering the list of templates.