ui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package ui provides a user interface for searching.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTemplatePicker

func RunTemplatePicker(templatesPath string) (string, error)

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) Init

func (m SearchModel) Init() tea.Cmd

Init implements tea.Model.

func (SearchModel) Update

func (m SearchModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

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) Update

func (m TemplatePickerModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model, handling keyboard navigation.

func (TemplatePickerModel) View

func (m TemplatePickerModel) View() string

View implements tea.Model, rendering the list of templates.

Jump to

Keyboard shortcuts

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