Summary
In pi-fff, frecency ranking and query history are no-ops unless --fff-frecency-db / --fff-history-db (or the FFF_FRECENCY_DB / FFF_HISTORY_DB env vars) are set. The README lists these as features and states "Search state is stored locally under ~/.pi/agent/fff/", but the code defaults both paths to undefined, which causes the Rust side to skip initializing these subsystems entirely.
Steps to reproduce
- Install pi-fff without setting
FFF_FRECENCY_DB or FFF_HISTORY_DB.
- Use
fffind repeatedly and select results.
- Search for the same query again. Frecency scores and query-history combo boost do not affect ranking.
- Check
~/.pi/agent/fff/ — no LMDB files exist there.
Expected behavior
Either:
- The README accurately reflects that these features require manual configuration, or
- The code defaults to
~/.pi/agent/fff/ (as the README already implies) so they work out of the box.
Actual behavior
SharedFrecency and SharedQueryTracker stay in their default uninitialized state. Every frecency read returns 0, every write is a no-op, and no LMDB files are created.
Root cause in packages/pi-fff/src/index.ts:
const frecencyDbPath =
(pi.getFlag("fff-frecency-db") as string | undefined) ??
process.env.FFF_FRECENCY_DB ??
undefined; // <- should default to ~/.pi/agent/fff/frecency
Same pattern for historyDbPath.
Additional context
In fff-nvim these are always on because conf.lua provides default paths under Neovim's stdpath. The pi-fff extension was likely written with the nvim assumption that defaults exist, but the pi integration has no equivalent built-in default.
Summary
In pi-fff, frecency ranking and query history are no-ops unless
--fff-frecency-db/--fff-history-db(or theFFF_FRECENCY_DB/FFF_HISTORY_DBenv vars) are set. The README lists these as features and states "Search state is stored locally under~/.pi/agent/fff/", but the code defaults both paths toundefined, which causes the Rust side to skip initializing these subsystems entirely.Steps to reproduce
FFF_FRECENCY_DBorFFF_HISTORY_DB.fffindrepeatedly and select results.~/.pi/agent/fff/— no LMDB files exist there.Expected behavior
Either:
~/.pi/agent/fff/(as the README already implies) so they work out of the box.Actual behavior
SharedFrecencyandSharedQueryTrackerstay in their default uninitialized state. Every frecency read returns 0, every write is a no-op, and no LMDB files are created.Root cause in
packages/pi-fff/src/index.ts:Same pattern for
historyDbPath.Additional context
In fff-nvim these are always on because
conf.luaprovides default paths under Neovim'sstdpath. The pi-fff extension was likely written with the nvim assumption that defaults exist, but the pi integration has no equivalent built-in default.