-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Summary
Add @-triggered fuzzy file search popup to the TUI input area. Typing @ in Insert mode opens an interactive file picker that fuzzy-matches project files by name, path, and extension.
Motivation
When composing messages in TUI, users often need to reference files. Currently they must type full paths manually. An @-triggered picker (similar to VS Code, GitHub, etc.) provides fast file discovery without leaving the input.
Design
UX Flow
- Type
@in Insert mode → popup opens above input - Continue typing to fuzzy-filter (e.g.,
@main.rs,@src/app) Up/Downnavigate results (top 10 shown)Enter/Tabaccept → replaces@querywith relative file pathEscdismisses without inserting- Backspace past
@auto-dismisses
Implementation
- Fuzzy engine:
nucleo-matcher(same as Helix editor — fast, zero-alloc) - File walking:
ignorecrate (already in workspace, respects.gitignore) - File index: cached with 30s TTL, rebuilt on next
@trigger - Rendering: overlay popup above input (reuses
Clear+centered_rectpattern from confirm modal) - State:
FilePickerState { query, matches, selected, anchor }inApp
New files
crates/zeph-tui/src/file_search.rs— file index + fuzzy matchingcrates/zeph-tui/src/widgets/file_picker.rs— popup widget
Modified files
crates/zeph-tui/src/app.rs— state + key interceptioncrates/zeph-tui/src/widgets/mod.rs— module exportcrates/zeph-tui/Cargo.toml— addnucleo-matcher,ignore
Detailed plan
.local/plan/tui-file-picker.md
Acceptance Criteria
-
@in Insert mode opens file picker popup - Fuzzy search matches file name, directory, and extension
- Results update on each keystroke
- Enter/Tab inserts relative path at cursor position
- Esc dismisses without side effects
-
.gitignored files excluded - Snapshot tests for widget rendering
- Unit tests for fuzzy matching logic
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels