You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Let @ mentions autocomplete paths outside the project (~/, ../, absolute)
#17399
The composer @ search covers only the current project (the thread worktree, or the project root). I often want to point the agent at a file outside it: a sibling repo, a config in ~/.config, a script in ~/bin, or a file one level up.
Today, typing a path after @ does not work:
@../foo: the leading . and / are removed from the query, so it searches for foo inside the project.
@~/foo and @/abs/path: matched as text against project-relative paths, so usually nothing.
The only ways to reference those files now are to drop a folder on the composer (desktop, local only), attach the file, or type the full path as plain text with no autocomplete.
Proposal
When the text after @ starts with ~/, /, ./ or ../, treat it as a path and autocomplete it like a shell, one segment at a time. Selecting an entry inserts the same file mention the folder drop already inserts (absolute path). Plain @foo keeps the current fuzzy project search.
The command palette already does this for folders (filesystem.browse, path detection in isFilesystemBrowseQuery), so the server-side path resolution exists.
Open questions
Files, not just folders.filesystem.browse returns directories only. This needs either a includeFiles option on browse or a separate call. Which do you prefer?
Remote environments.~ resolves on the server's machine, which is right for "what the agent can read", but may surprise someone on a phone or on app.t3.codes. Is that acceptable, or should this be local-only at first like the folder drop?
Selecting a folder. Insert the folder as a mention, or continue the path (@~/src/ and keep listing)? I would continue the path, and insert on a second selection or a space.
Mobile. Mobile has its own @ search hook. Same change there in the same PR, or web first?
I would like to implement this if the direction and scope look right.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
The composer
@search covers only the current project (the thread worktree, or the project root). I often want to point the agent at a file outside it: a sibling repo, a config in~/.config, a script in~/bin, or a file one level up.Today, typing a path after
@does not work:@../foo: the leading.and/are removed from the query, so it searches forfooinside the project.@~/fooand@/abs/path: matched as text against project-relative paths, so usually nothing.The only ways to reference those files now are to drop a folder on the composer (desktop, local only), attach the file, or type the full path as plain text with no autocomplete.
Proposal
When the text after
@starts with~/,/,./or../, treat it as a path and autocomplete it like a shell, one segment at a time. Selecting an entry inserts the same file mention the folder drop already inserts (absolute path). Plain@fookeeps the current fuzzy project search.The command palette already does this for folders (
filesystem.browse, path detection inisFilesystemBrowseQuery), so the server-side path resolution exists.Open questions
filesystem.browsereturns directories only. This needs either aincludeFilesoption on browse or a separate call. Which do you prefer?~resolves on the server's machine, which is right for "what the agent can read", but may surprise someone on a phone or on app.t3.codes. Is that acceptable, or should this be local-only at first like the folder drop?@~/src/and keep listing)? I would continue the path, and insert on a second selection or a space.@search hook. Same change there in the same PR, or web first?I would like to implement this if the direction and scope look right.
Investigated with Claude Code (Opus 5.5).
All reactions