Help us shape the future of Go! Take the 2026 Go Developer Survey

tui

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTTY

func IsTTY() bool

func NewProgram

func NewProgram(
	progressCh <-chan types.ProgressUpdate,
	workerCh <-chan WorkerUpdate,
	backendName string,
	backendOK bool,
	numWorkers int,
	queryFn func(string) string,
) *tea.Program

NewProgram builds a Bubbletea program. Returns nil when stdout is not a TTY. workerCh may be nil for single-goroutine mode. queryFn handles query commands after extraction completes.

func RenderBuildSummary added in v1.7.1

func RenderBuildSummary(result BuildRunResult) string

func RenderFileSummary

func RenderFileSummary(total, code, docs, other int) string

RenderFileSummary renders a summary of files discovered

func RenderProgress

func RenderProgress(p types.ExtractionProgress, width int) string

RenderProgress renders a progress bar with extraction stats This is a pure rendering function - state lives in the Bubbletea model

func RenderProviderStatus

func RenderProviderStatus(provider string, isHealthy bool) string

RenderProviderStatus renders the current pipeline backend info.

func RunPlainProgress

func RunPlainProgress(ch <-chan types.ProgressUpdate)

RunPlainProgress reads from ch and prints progress lines to stdout. Used when stdout is not a TTY.

Types

type AgentInstallModel added in v1.9.0

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

func NewAgentInstallModel added in v1.9.0

func NewAgentInstallModel() AgentInstallModel

func (AgentInstallModel) Init added in v1.9.0

func (m AgentInstallModel) Init() tea.Cmd

func (AgentInstallModel) Quitting added in v1.9.0

func (m AgentInstallModel) Quitting() bool

func (AgentInstallModel) Update added in v1.9.0

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

func (AgentInstallModel) View added in v1.9.0

func (m AgentInstallModel) View() string

func (AgentInstallModel) ViewContent added in v1.9.0

func (m AgentInstallModel) ViewContent() string

type AgentInstallRequest added in v1.9.0

type AgentInstallRequest = agentinstall.Request

type AgentInstallResult added in v1.9.0

type AgentInstallResult = agentinstall.Result

type AgentInstallTarget added in v1.9.0

type AgentInstallTarget = agentinstall.Target

type BuildRunRequest added in v1.7.1

type BuildRunRequest struct {
	RepoRoot string
	Observe  func(app.BuildEvent)
	Mode     string
}

type BuildRunResult added in v1.7.1

type BuildRunResult struct {
	GraphPath    string
	HTMLPath     string
	ReportPath   string
	ObsidianPath string
	Files        int
	Facts        int
	Stages       []BuildStageSummary
	Warnings     []string
}

type BuildStageSummary added in v1.7.1

type BuildStageSummary struct {
	Name  string
	Count int
}

type BuildStatus added in v1.7.1

type BuildStatus struct {
	Running bool
	Done    bool
	Error   string
}

BuildStatus is the classic TUI build lifecycle summary.

type ExtractModel

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

func NewExtractModel

func NewExtractModel() ExtractModel

func NewExtractModelWithRoot added in v1.7.1

func NewExtractModelWithRoot(root string) ExtractModel

func NewUpdateModel added in v1.7.1

func NewUpdateModel() ExtractModel

func NewUpdateModelWithRoot added in v1.7.1

func NewUpdateModelWithRoot(root string) ExtractModel

func (ExtractModel) Init

func (m ExtractModel) Init() tea.Cmd

func (ExtractModel) Quitting

func (m ExtractModel) Quitting() bool

func (ExtractModel) StatusMessage added in v1.7.1

func (m ExtractModel) StatusMessage() string

func (ExtractModel) Update

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

func (ExtractModel) View

func (m ExtractModel) View() string

func (ExtractModel) ViewContent

func (m ExtractModel) ViewContent() string

type GraphStatusModel

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

func NewGraphStatusModel

func NewGraphStatusModel() GraphStatusModel

func NewGraphStatusModelWithGraphPath added in v1.7.1

func NewGraphStatusModelWithGraphPath(graphPath string) GraphStatusModel

func (GraphStatusModel) FooterHelp

func (m GraphStatusModel) FooterHelp() string

func (GraphStatusModel) Init

func (m GraphStatusModel) Init() tea.Cmd

func (GraphStatusModel) Quitting

func (m GraphStatusModel) Quitting() bool

func (GraphStatusModel) Subtitle added in v1.7.1

func (m GraphStatusModel) Subtitle() string

func (GraphStatusModel) Update

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

func (GraphStatusModel) View

func (m GraphStatusModel) View() string

func (GraphStatusModel) ViewContent

func (m GraphStatusModel) ViewContent() string
type MenuModel struct {
	// contains filtered or unexported fields
}

func NewMenuModel

func NewMenuModel() MenuModel

func NewMenuModelWithVersion

func NewMenuModelWithVersion(ver string) MenuModel
func (m MenuModel) Init() tea.Cmd
func (m MenuModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
func (m MenuModel) View() string

type Model

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

Model is the top-level Bubbletea model.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

type Pool

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

Pool manages N worker goroutines and sends status updates on a channel. Callers create a Pool, call Run(), and range over Updates() to display per-worker progress.

func NewPool

func NewPool(n int, jobs <-chan string, results chan<- workerResult) *Pool

NewPool creates a Pool with n workers reading from jobs.

func (*Pool) Run

func (p *Pool) Run(process func(file string) error)

Run launches n worker goroutines. Each goroutine reads from jobs, sends WorkerUpdates, and writes results. Run returns when all workers exit.

func (*Pool) Updates

func (p *Pool) Updates() <-chan WorkerUpdate

Updates returns the channel of WorkerUpdate messages.

type ProjectsModel added in v1.3.0

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

func NewProjectsModel added in v1.3.0

func NewProjectsModel() ProjectsModel

func NewProjectsModelWithGraphPath added in v1.7.1

func NewProjectsModelWithGraphPath(graphPath string) ProjectsModel

func (*ProjectsModel) ConsumeGraphStatusPath added in v1.7.1

func (m *ProjectsModel) ConsumeGraphStatusPath() (string, bool)

func (ProjectsModel) FooterHelp added in v1.3.0

func (m ProjectsModel) FooterHelp() string

func (ProjectsModel) Init added in v1.3.0

func (m ProjectsModel) Init() tea.Cmd

func (ProjectsModel) Quitting added in v1.3.0

func (m ProjectsModel) Quitting() bool

func (ProjectsModel) Update added in v1.3.0

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

func (ProjectsModel) View added in v1.3.0

func (m ProjectsModel) View() string

func (ProjectsModel) ViewContent added in v1.3.0

func (m ProjectsModel) ViewContent() string

type UninstallModel added in v1.3.0

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

func NewUninstallModel added in v1.3.0

func NewUninstallModel() UninstallModel

func (UninstallModel) FooterHelp added in v1.3.0

func (m UninstallModel) FooterHelp() string

func (UninstallModel) Init added in v1.3.0

func (m UninstallModel) Init() tea.Cmd

func (UninstallModel) Quitting added in v1.3.0

func (m UninstallModel) Quitting() bool

func (UninstallModel) Update added in v1.3.0

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

func (UninstallModel) View added in v1.3.0

func (m UninstallModel) View() string

func (UninstallModel) ViewContent added in v1.3.0

func (m UninstallModel) ViewContent() string

type WorkerStatus

type WorkerStatus struct {
	ID     int
	File   string // current file being processed (empty = idle)
	Idle   bool
	Done   bool
	ErrMsg string
}

WorkerStatus describes the current state of one extraction worker.

type WorkerUpdate

type WorkerUpdate struct {
	Status WorkerStatus
}

WorkerUpdate is sent on the worker channel when a worker changes state.

Jump to

Keyboard shortcuts

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