What
The Unix socket daemon protocol currently accepts only:
{ "cmd": "open_path", "path": "/some/dir", "in_grep": false }
There is no way to pass a pre-filled search query — no query, filter, or constraint field.
Why
This forces integrations (like vscode-fff-gpui) down a suboptimal path:
-
Type-filtered search — To open the picker scoped to e.g. only TypeScript files, the integration must shell out to rg --files --type ts, create a temp directory with symlinks to the filtered files, then send open_path pointing at that temp dir. This adds an external dependency (ripgrep), temp-file overhead, and complexity.
-
Pre-filled grep — To implement a "Find TODO/FIXME" shortcut, the integration must run git grep -lE '(TODO|FIXME)' first, create another overlay, and open that. The user can't just land in grep mode with TODO already typed in the search bar.
-
Resume with state — Integrations can track "last search kind" in-memory, but can't restore the user's actual search query — only the mode (files vs grep).
The daemon already has all the capabilities internally — fff-search supports glob patterns (**/*.rs), git-status filtering (git:modified), exclusion (!node_modules), and full grep with plain/regex/fuzzy modes. The problem is purely that the socket protocol can't pass a query in.
How
Add an optional query field to the open_path command:
{
"cmd": "open_path",
"path": "/my/project",
"in_grep": true,
"query": "TODO|FIXME"
}
{
"cmd": "open_path",
"path": "/my/project",
"in_grep": false,
"query": "**/*.{ts,tsx} git:modified"
}
When query is present, the daemon would pre-fill the search bar with the given text so the user lands in a ready-to-navigate state. If absent, behavior is unchanged (empty search bar, as today).
This is a minimal, backward-compatible addition — any existing client that doesn't send query works exactly as before.
What
The Unix socket daemon protocol currently accepts only:
{ "cmd": "open_path", "path": "/some/dir", "in_grep": false }There is no way to pass a pre-filled search query — no
query,filter, orconstraintfield.Why
This forces integrations (like vscode-fff-gpui) down a suboptimal path:
Type-filtered search — To open the picker scoped to e.g. only TypeScript files, the integration must shell out to
rg --files --type ts, create a temp directory with symlinks to the filtered files, then sendopen_pathpointing at that temp dir. This adds an external dependency (ripgrep), temp-file overhead, and complexity.Pre-filled grep — To implement a "Find TODO/FIXME" shortcut, the integration must run
git grep -lE '(TODO|FIXME)'first, create another overlay, and open that. The user can't just land in grep mode withTODOalready typed in the search bar.Resume with state — Integrations can track "last search kind" in-memory, but can't restore the user's actual search query — only the mode (files vs grep).
The daemon already has all the capabilities internally —
fff-searchsupports glob patterns (**/*.rs), git-status filtering (git:modified), exclusion (!node_modules), and full grep with plain/regex/fuzzy modes. The problem is purely that the socket protocol can't pass a query in.How
Add an optional
queryfield to theopen_pathcommand:{ "cmd": "open_path", "path": "/my/project", "in_grep": true, "query": "TODO|FIXME" }{ "cmd": "open_path", "path": "/my/project", "in_grep": false, "query": "**/*.{ts,tsx} git:modified" }When
queryis present, the daemon would pre-fill the search bar with the given text so the user lands in a ready-to-navigate state. If absent, behavior is unchanged (empty search bar, as today).This is a minimal, backward-compatible addition — any existing client that doesn't send
queryworks exactly as before.