smelt.picker¶
Tier: UiHost - Requires a terminal UI; calling these from headless mode raises.
Visibility: Public - Stable Lua API intended for user config and plugins.
Picker handle constructor. smelt.picker.new(opts) opens a picker overlay and returns a Picker userdata. The picker is non-blocking; the yield-until-pick wrapper lives in pure Lua as smelt.picker.choose(opts).
smelt.picker.fuzzy¶
Types: smelt.picker.FuzzyOpts, smelt.picker.FuzzyResult
Fuzzy-finder picker. Filters opts.items against the prompt input on every
keystroke, ranked by smelt.fuzzy.rank. Accepts string items or
{ label, description?, ansi_color?, search_terms? } records. Returns
{ index, item, action } on accept or nil on dismiss.
• opts.on_select(item) - fires on navigation
• opts.placement - defaults to "prompt_docked"
smelt.picker.new¶
Types: smelt.picker.NewOpts, smelt.picker.Picker
Open a picker overlay and return a Picker userdata. The picker is non-blocking; the yield-until-pick wrapper lives in pure Lua as smelt.picker.choose(opts).
smelt.picker.open¶
Types: smelt.picker.NewOpts, smelt.picker.OpenResult
Open a floating picker over opts.items and yield until the user
accepts or dismisses. opts is forwarded to smelt.picker.new for
placement / styling; up/down/ctrl-j/k/p/n navigate, Enter resolves,
Esc/Ctrl-C dismisses. Returns { index, item } on accept or nil on
dismiss. Must run inside a smelt.spawn (or tool execute) frame.