lp

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package lp is evva's "low profile" terminal UI: a quiet, professional black + gold alternative to the bundled NEON TOKYO TUI. It satisfies the public ui.UI contract (pkg/ui) and drives any agent through ui.Controller, so it depends only on pkg/* — a host selects it with `evva -tui lp`.

lp owns its identity (theme, root model, slim top status line, underline input, compact panels — and crucially, NO banner) while reusing evva's proven renderers from pkg/ui/bubbletea/components (transcript, slash, overlays) re-themed black + gold. Reused message types come from pkg/ui/bubbletea/events so the two UIs share one msg vocabulary.

Wiring (host responsibility):

tui := lp.New(evvaHome)
ag, _ := agent.New(agent.Config{...}, agent.WithSink(tui), agent.WithRootContext(ctx))
tui.Attach(ag.Controller())
tui.Run(ctx)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UI

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

UI is the low-profile TUI. Construct with New(); attach an agent via Attach() before calling Run().

func New

func New(evvaHome string) *UI

New builds a UI ready to be Attached and Run. evvaHome is the user's config directory; it is plumbed to the app model for future settings resolution (lp deliberately has no banner to load).

Mouse capture is on via tea.WithMouseCellMotion so the wheel scrolls the transcript viewport.

func (*UI) Attach

func (u *UI) Attach(c ui.Controller)

Attach hands the UI its agent controller. Must be called before Run.

func (*UI) Emit

func (u *UI) Emit(e event.Event)

Emit satisfies event.Sink — by queueing, never by calling Send inline. Program.Send blocks while the receive loop is busy or not yet running, and emitters may hold locks the render path reads back (see ui.EmitQueue). The inline Send lp used to do here carried both the dynamic-workflow dispatch deadlock and the pre-Run startup deadlock the NEON TUI had already patched; the queue closes both.

func (*UI) Run

func (u *UI) Run(ctx context.Context) error

Run starts the bubbletea program and blocks until exit. ctx cancellation triggers a clean shutdown via a QuitMsg. The emit pump starts here; events queued since construction flush first.

Directories

Path Synopsis
Package app is lp's top-level tea.Model — the low-profile root.
Package app is lp's top-level tea.Model — the low-profile root.

Jump to

Keyboard shortcuts

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