fff icon indicating copy to clipboard operation
fff copied to clipboard

Feature request: relax path constraint must be relative to the workspace

Open tekumara opened this issue 6 months ago • 10 comments

for example, when asking questions about pi itself, the agent wants to search ~/.pi

 ffgrep /skills/ in
 /Users/tekumara/.fnm/node-versions/v24.11.1/installation/lib/node_modules/@earendil-works/pi-coding-agent/docs/ limit 20

 Path constraint must be relative to the workspace:
 /Users/tekumara/.fnm/node-versions/v24.11.1/installation/lib/node_modules/@earendil-works/pi-coding-agent/docs/

@ff-labs/[email protected]

tekumara avatar May 10 '26 04:05 tekumara

I often ask tasks that relies on grepping outside of the current path. Would be great to have it covered.

Guria avatar May 13 '26 05:05 Guria

Cross-worktree frecency by relative path would be a great feature!

gnohj avatar May 14 '26 15:05 gnohj

[triage-bot] REPRODUCED: Reproduced on origin/main. Branch: triage-bot/issue-463.

MCP tool ffgrep enforces workspace-relative paths via normalizePathConstraint(). Absolute paths outside workspace throw Path constraint must be relative to the workspace error.

Root cause: packages/pi-fff/src/query.ts:13-17 rejects any path that resolves to ../ (outside workspace). FFF Rust core accepts absolute paths. Constraint is TypeScript-layer only.

Repro:

# From project root
cd packages/pi-fff
bun test
# Test at line 14-18 shows rejection behavior

Working on fix on triage-bot/issue-463.

gustav-fff avatar May 20 '26 16:05 gustav-fff

unfortunately this won't work rn

dmtrKovalenko avatar May 20 '26 17:05 dmtrKovalenko

@dmtrKovalenko may I ask why?

tifandotme avatar Jun 20 '26 13:06 tifandotme

@tifandotme Probably because they rely on index

@dmtrKovalenko would it be possible to offer regular grep results as fallback in this case? it will save some tool calls that model has to make to realise what happens.

Also model may start thinking that fff is unreliable and since that don't try it even for inside repo calls.

Guria avatar Jun 20 '26 15:06 Guria

Also model may start thinking that fff is unreliable and since that don't try it even for inside repo calls.

@Guria Happened to me.

i use override fff mode. so model just ignores the grep tool, and use rg instead from bash

tifandotme avatar Jun 20 '26 15:06 tifandotme

This is on my todo list for 0.10

dmtrKovalenko avatar Jun 20 '26 16:06 dmtrKovalenko

@gustav-fff as a quck hotfix prototype a way to store up to 3 additional pickers for pi-fff for non cwd paths, that are going to rotate and die after 5 minutes of inactivity. This should not take more than 200-300 lines of code keep it consize

dmtrKovalenko avatar Jun 20 '26 20:06 dmtrKovalenko

Also model may start thinking that fff is unreliable and since that don't try it even for inside repo calls.

I second this. I disabled fff entirely because of that :-(

mikhail-putilov avatar Jul 06 '26 08:07 mikhail-putilov