tui

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package tui hosts the Bubble Tea dashboard and SKILL.md preview, rendering over the app service layer and refusing to launch without a TTY.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Preview

func Preview(markdown string, width int) (string, error)

Preview renders SKILL.md markdown for terminal display, sanitizing untrusted escape sequences before rendering so remote content cannot inject terminal control codes (FR-045).

func Run

func Run(rows []SkillRow, isTTY bool) error

Run launches the interactive dashboard. It refuses to start without a TTY, returning a usage error that points at the equivalent CLI commands (FR-041).

func Sanitize

func Sanitize(s string) string

Sanitize strips terminal control sequences and non-printable control characters from untrusted content before it is rendered, defending against terminal-injection via remote SKILL.md content (FR-045). Newlines and tabs are preserved.

func SelectSkills added in v0.1.0

func SelectSkills(items []SkillItem, isTTY bool) ([]int, error)

SelectSkills runs the interactive multi-select picker and returns the indices of the chosen skills. It refuses to start without a TTY. A cancelled picker returns an empty selection and a nil error (the caller treats that as "no skill selected").

Types

type SkillItem added in v0.1.0

type SkillItem struct {
	ID          string
	DisplayName string
	RepoPath    string
	Valid       bool
}

SkillItem is one selectable skill in the interactive picker.

type SkillRow

type SkillRow struct {
	Name     string
	Status   string
	Markdown string // SKILL.md content for the preview pane
}

SkillRow is one entry shown in the dashboard.

Jump to

Keyboard shortcuts

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