Completion Ranking
@ files and / commands you use often rise to the top of the completion menu
The interactive @ and / menus float the files and commands you pick most into the top slots — no setup, no config.
Quick Start
- Pick a file once with @
Start an interactive session, type
@accand acceptsrc/accounts.pyfrom the popup.text ❯ @acc src/account_service.py src/accounts.py ← accept this one - Pick it again — it's first in the menu
Next time you type
@acc, the file you chose is ranked above the other close matches.text ❯ @acc src/accounts.py ← now on top src/account_service.py
How It Works
Each pick is recorded, and the next menu uses a small usage boost (0–20) to reorder matches.
Recent picks count more than old ones:
| Age of last pick | Recency weight |
|---|---|
| < 4 hours | 1.0 |
| < 1 day | 0.7 |
| < 1 week | 0.5 |
| < 30 days | 0.3 |
| ≥ 30 days | 0.1 |
The boost is round(count × weight × 4), capped at 20.
@files — the boost is added to the 0–100 fuzzy score before sorting./commands — matching commands are sorted by boost alone; ties keep their original order.
Which Surfaces Use It
Ranking applies wherever you accept an @ file or a / command from a menu.
| Surface | What gets ranked |
|---|---|
@ file popup (Textual TUI) | File paths you accept |
/ command popup (Textual TUI) | Commands you accept |
/ completer in prompt_toolkit REPL | Commands, using picks recorded in the TUI popup |
Where History Is Stored
History lives in ~/.praisonai/sessions/projects/<project-id>/frecency.json (under PRAISONAI_HOME if set).
Clones and worktrees of the same repo share one history. Delete the file to reset ranking.
No Config Needed
There is no on/off switch — an empty history already gives the original fuzzy order.
Best Practices
Reset ranking per project
Delete frecency.json in the project’s sessions folder to start fresh. The next pick creates a new file.
History is per-project, not global
Clones and worktrees of the same repo share history; unrelated repos never see each other’s picks.
Type more to reach any item
For @ files the 20-point cap keeps much better string matches on top. For / commands, used commands rise above unused ones — type more of the name to narrow the list.
No history leak between kinds
Files and commands are tracked separately, so a busy /help never affects @ file order.