Reference · Composing and shortcuts
File mentions
How to open the composer's file picker, which files it offers, and what a mention becomes once sent.
Ctrl + . (⌘ + . on a Mac) opens a file picker over the composer, listing the files under the
session's working directory. Picking a file writes it into the draft at the caret as @path.
The picker takes its own focus, unlike the slash-command menu beside it. What is typed to find a file goes into the picker's own search box, never into the message.
Matching
Every word typed has to appear somewhere in the path, in any order — composer test finds
Composer.test.tsx. An exact name match ranks first, then a name starting with what was typed,
then a name containing it, then a path containing it anywhere. A tie within a tier goes to the
shorter path, which puts a file near the root above the same name deep in a tree.
Which files are offered
Inside a git repository, the list is every tracked file plus every untracked file git would
not ignore. Git's own exclude sources apply: the repository's .gitignore files,
.git/info/exclude, and the excludes set for the whole machine. Nothing under .git ever
appears in the list. A file staged and then removed from disk still does, since nothing reads
it to check.
Outside a git repository, the folder is walked directly, and .git, node_modules, .venv
and __pycache__ are never entered. A symlink is left alone. A .gitignore file found along
the way is applied, covering comments, negation with !, a leading-slash anchor, a
trailing-slash directory pattern, *, ? and **. A character class and a backslash escape
in a .gitignore are not read, and neither is a .gitignore outside the folder being walked.
The walk stops once it reaches a fixed number of files, or a fixed depth of folders. The picker says so at the bottom of the list when it was cut short.
Once sent
@path reaches the model as part of the message, in the form the CLI itself reads as a file
reference. In the sender's own message it renders as plain text, and pressing it does nothing
there. A reply that names the same path turns that occurrence into a link to the file, the same as
any reference in the model's prose. Pressing it opens the file in the editor set on Settings'
External editor field.