Skip to lesson
Exit
At-Mentions and Context Types1 / 1

2 min lesson

Walkthrough: At-mentions — attach the file that defines done

Complete "Walkthrough: At-mentions, attach the file that defines done". Check the final state against the lesson before you move on.

Check your understanding

Complete this walkthrough: At-mentions — attach the file that defines done.

Outcome: Finish with the result shown in the final walkthrough step.

At-mentions — attach the file that defines done

Agent chat, @-mentions

5 steps · ~3 min

Decide what to attach → Type @ → Pick the file → Send → Read the grounded answer

Read this walkthrough as text
At-mentions — attach the file that defines done
Agent chat, @-mentions
SaySearch returns everything for two-letter queries. Before the question goes out, decide what rides with it: the file the behavior lives in, or nothing.
Type@search
Do@ opens the whole context menu — Files & Folders, Docs, Terminals, Past Chats, your branch diff and the Browser — and typing after it filters the suggestions.
SeesearchFilter.ts is on top, highlighted. Everything the Agent can be handed lives behind @.
DoPick searchFilter.ts from the suggestions.
SeeThe file lands as a teal pill inside your prompt — it travels with the question instead of hoping the Agent finds it.
Typewhy does this return everything for two-letter queries?
DoSend it.
SeeThe run explores the one file you scoped — no repo-wide guessing.
SeeThe answer cites the mechanism by line: query.trim() turns a whitespace-only two-character query into an empty string, and the !q early-return hands back everything. Same model, same question — the attached context is what made the answer specific.

Simulated Cursor 3.12 (macOS, light) — beta educational reconstruction, not the real product.

Learn more

Optional practice

Practice: Walkthrough: At-mentions — attach the file that defines done

QYou've applied it. What actually proves the work is done, not just a plausible answer?

Finish the check to continue.