Feature: @file completion with frecency ranking in the TUI
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Summary
Add @file mention completion to the TUI prompt: typing @ triggers a file-path picker backed by a two-layer index (git ls-files + lazy ignored-directory scan), ranked by frecency, with file-chip-aware deletion.
Problem
Referencing a file in a prompt today means typing or pasting its path manually. There is no tab-completion or fuzzy picker for files from the prompt input, so users waste keystrokes and make typos on long paths.
Proposal
@in the prompt opens a completion popup with workspace files.- Two-layer path index:
git ls-filesfor tracked files + lazy scan of ignored directories (refreshed with an adaptive TTL based on workspace size). - Frecency ranking (frequency + recency) so recently/frequently used files surface first.
- Search history cache to avoid re-indexing on every keystroke.
- File-chip-aware deletion: backspace on a completed
@filechip removes the whole chip, not one character.
Implementation
A working implementation is ready for review on the select_files branch (rebased onto latest master, 3104 insertions across 32 files, jcode-tui + jcode-app-core build, file_mention + char_bag + accept_completion tests pass).
@1jehuang would be great if you could take a look.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the select_files branch and the jcode-tui and jcode-app-core changes, then run the mentioned file_mention, char_bag, and accept_completion tests. Done means the TUI supports @file completion with the proposed indexing, frecency ranking, search-history caching, and whole-chip deletion behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100