File mentions
Type @ in the input and Polyglot pops up a fuzzy-search list of the project’s
files. Pick one (arrow keys, Tab or Enter to insert) or just type the path.
On send, every @<path> in the message is replaced with the file’s contents inline,
so the model has the file from the first token instead of spending a read_file
call to go get it.
> what does @src/agent/loop.ts do, and where is the retry logic?The transcript keeps your @-text as written and adds a dim note
(attached src/agent/loop.ts (312 lines)) so it’s clear what was sent.
The file list
Section titled “The file list”The picker lists files under the working directory, with these left out:
- anything matched by the repo’s root
.gitignoreand.git/info/exclude node_modules,.git,dist,build,coverage, and the usual build/cache dirs- secret files -
.env,*.pem, anything under.ssh/
It’s loaded once when the session starts and capped at 2,000 entries, so on a very large repo type the path rather than scrolling.
What gets inlined
Section titled “What gets inlined”- The
@<path>token is replaced with a<file path="…">…</file>block. - 64 KB per file. Anything past that is cut with a
[... truncated]marker. - A
@<path>that doesn’t resolve to a readable file is left untouched - it’s just text. - Secret files are never inlined. A
@.envgets askipped .env (secret file)note instead, so a stray mention can’t leak one into the prompt.
Inlined file contents go to the model provider like any other prompt text - see Data handling.
@ is also for agents and skills
Section titled “@ is also for agents and skills”The same @ picker suggests agent definitions and
skills when you have them. @<agent> <task> at the start of a
message runs that agent; @<skill> anywhere in a message activates that skill.
Headless
Section titled “Headless”File mentions work in -p mode too:
polyglot -p "summarize @CHANGELOG.md for a release announcement"