1jehuang / 1jehuang/jcode

Feature: @file completion with frecency ranking in the TUI

Open
#837 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

autonomous: no enhancement triage: needs-decision
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-files for 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 @file chip 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.