Documentation
¶
Overview ¶
Package picker runs the interactive picker workflow: structure-first skeleton launch, a background streaming scan, git-relevance rank patching, and selection-to-output conversion. It owns the scan lifecycle and selection callbacks so the CLI command only assembles options. The Bubble Tea model stays in internal/tui; this package bridges it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env struct {
App *app.App
RecordDump func(rootDir string, files []format.FileEntry, ref string) error
RecordDelta func(rootDir, ref string, files, tokens int) error
CountTokens func(content []byte) int
}
Env supplies the picker with services beyond config: the application handle for scanning, rendering, and output, plus callbacks for recording dump and delta state and counting raw payloads, which live in the command layer.
type Result ¶
type Result struct {
// Selections is the user's file selection and modes, empty when the
// session ended via a delta dump, the user selected nothing, or no
// eligible files existed.
Selections []tui.Selection
// DeltaDone reports that the session ended by performing a delta dump,
// whose output replaces any picker selection.
DeltaDone bool
// NoEligible reports that no files survived the ignore, binary, size, and
// smart filters, so the picker never opened. The command surfaces this
// distinctly from a plain non-selection.
NoEligible bool
}
Result carries the picker workflow's outcome to the command layer.