tui

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package tui implements the terminal user interface for Cortex.

It provides an interactive terminal interface for browsing, searching, and managing memories using BubbleTea.

DEPENDENCY: This package requires github.com/charmbracelet/bubbletea and github.com/charmbracelet/lipgloss. Add them with:

go get github.com/charmbracelet/bubbletea
go get github.com/charmbracelet/lipgloss

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(deps *Deps) error

Run starts the TUI in non-interactive mode (fallback without BubbleTea). This is a simplified version that works without the BubbleTea dependency. Once BubbleTea is added, this should be replaced with tea.NewProgram().

Types

type Deps

type Deps struct {
	Observations *sqlitestore.Store
	Search       *search.Store
}

Deps bundles store dependencies for the TUI.

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model holds the TUI state.

func New

func New(deps *Deps) *Model

New creates a new TUI model.

type State

type State int

State represents the current TUI view.

const (
	StateList   State = iota // Browsing observation list
	StateSearch              // Search input mode
	StateDetail              // Viewing observation detail
)

Jump to

Keyboard shortcuts

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