Documentation
¶
Overview ¶
Package tui is `mesh tui`: a keyboard-driven terminal view of the vault over the same index + graph + retriever the agent uses. Three panes: a notes list, ranked search results, and a markdown preview with the note's neighbors. Built on bubbletea/lipgloss; the Backend interface keeps the UI testable and leaves room for a future remote backend (deferred, like the web viewer's).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the parent bubbletea model: three panes (notes list, search results, preview) with focus arbitration and a single keymap.
type Backend ¶
type Backend interface {
Notes() []NoteRef
Search(query string) ([]retrieve.Card, error)
Note(id string) (NoteDetail, error)
}
Backend is the data surface the TUI renders. LocalBackend reads the on-disk index + graph; a RemoteBackend (over the hub) is deferred.
type LocalBackend ¶
type LocalBackend struct {
// contains filtered or unexported fields
}
LocalBackend serves the TUI from the local SQLite index + in-memory graph.
func NewLocalBackend ¶
func NewLocalBackend(vaultRoot string) (*LocalBackend, func() error, error)
NewLocalBackend opens the vault index, builds the graph once, and returns the backend plus a close func the caller defers.
func (*LocalBackend) Note ¶
func (b *LocalBackend) Note(id string) (NoteDetail, error)
Note reads a note's markdown and its typed neighbors (in + out, headings and the note itself excluded).
func (*LocalBackend) Notes ¶
func (b *LocalBackend) Notes() []NoteRef
Notes lists every note, hubs first (highest degree), ties by title.
type NeighborRef ¶
type NeighborRef struct {
ID, Title, Rel, Dir string // Dir: out (this -> it) | in (it -> this)
}
NeighborRef is one linked note shown under the preview.
type NoteDetail ¶
type NoteDetail struct {
ID, Title, Path, Type string
Body string
Neighbors []NeighborRef
}
NoteDetail is the preview payload: the note body plus its neighbors.