ui

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 11 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
}

func NewSearchModel

func NewSearchModel(idx bleve.Index) SearchModel

func (SearchModel) Chosen

func (m SearchModel) Chosen() string

func (SearchModel) Init

func (m SearchModel) Init() tea.Cmd

func (SearchModel) Update

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

func (SearchModel) View

func (m SearchModel) View() string

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