Skip to main content

Context Mentions

Context mentions are a powerful way to provide Roo Code with specific information about your project, allowing it to perform tasks more accurately and efficiently. You can use mentions to refer to files, folders, problems, and Git commits. Context mentions start with the @ symbol.

Context Mentions Overview - showing the @ symbol dropdown menu in the chat interface

Context mentions overview showing the @ symbol dropdown menu in the chat interface.

Types of Mentions

File mention example showing a file being referenced with @ and its contents appearing in the conversation

File mentions add actual code content into the conversation for direct reference and analysis.

Mention TypeFormatDescriptionExample Usage
File@/path/to/file.tsIncludes file contents in request context"Explain the function in @/src/utils.ts"
Folder@/path/to/folderIncludes contents of all files directly in the folder (non-recursive)"Analyze the code in @/src/components"
Problems@problemsIncludes VS Code Problems panel diagnostics"@problems Fix all errors in my code"
Terminal@terminalIncludes recent terminal command and output"Fix the errors shown in @terminal"
Git Commit@a1b2c3dReferences specific commit by hash"What changed in commit @a1b2c3d?"
Git Changes@git-changesShows uncommitted changes"Suggest a message for @git-changes"
URL@https://example.comImports website content"Summarize @https://docusaurus.io/"

File Mentions

File mention example showing a file being referenced with @ and its contents appearing in the conversation

File mentions incorporate source code with line numbers for precise references.

CapabilityDetails
Format@/path/to/file.ts (always start with / from workspace root)
ProvidesComplete file contents with line numbers
SupportsText files, PDFs, and DOCX files (with text extraction)
Works inInitial requests, feedback responses, and follow-up messages
LimitationsVery large files may be truncated; binary files not supported

Folder Mentions

Folder mention example showing directory contents being referenced in the chat

Folder mentions include the content of all files within the specified directory.

CapabilityDetails
Format@/path/to/folder (no trailing slash)
ProvidesComplete contents of all files within the directory
IncludesContents of non-binary text files directly within the folder (not recursive)
Best forProviding context from multiple files in a directory
TipBe mindful of context window limits when mentioning large directories

Problems Mention

Problems mention example showing VS Code problems panel being referenced with @problems

Problems mentions import diagnostics directly from VS Code's problems panel.

CapabilityDetails
Format@problems
ProvidesAll errors and warnings from VS Code's problems panel
IncludesFile paths, line numbers, and diagnostic messages
GroupsProblems organized by file for better clarity
Best forFixing errors without manual copying

Terminal Mention

Terminal mention example showing terminal output being included in Roo's context

Terminal mentions capture recent command output for debugging and analysis.

CapabilityDetails
Format@terminal
CapturesLast command and its complete output
PreservesTerminal state (doesn't clear the terminal)
LimitationLimited to visible terminal buffer content
Best forDebugging build errors or analyzing command output

Git Mentions

Git commit mention example showing commit details being analyzed by Roo

Git mentions provide commit details and diffs for context-aware version analysis.

TypeFormatProvidesLimitations
Commit@a1b2c3dCommit message, author, date, and complete diffOnly works in Git repositories
Working Changes@git-changesgit status output and diff of uncommitted changesOnly works in Git repositories

URL Mentions

URL mention example showing website content being converted to Markdown in the chat

URL mentions import external web content and convert it to readable Markdown format.

CapabilityDetails
Format@https://example.com
ProcessingUses headless browser to fetch content
CleaningRemoves scripts, styles, and navigation elements
OutputConverts content to Markdown for readability
LimitationComplex pages may not convert perfectly

How to Use Mentions

  1. Type @ in the chat input to trigger the suggestions dropdown
  2. Continue typing to filter suggestions or use arrow keys to navigate
  3. Select with Enter key or mouse click
  4. Combine multiple mentions in a request: "Fix @problems in @/src/component.ts"

The dropdown automatically suggests:

  • Recently opened files
  • Visible folders
  • Recent git commits
  • Special keywords (problems, terminal, git-changes)
  • All currently open files (regardless of ignore settings or directory filters)

The dropdown automatically filters out common directories like node_modules, .git, dist, and out to reduce noise, even though their content could be included if manually typed.

Important Behaviors

Ignore File Interactions

BehaviorDescription
.rooignore bypassFile and folder @mentions bypass .rooignore checks when fetching content for context. Content from ignored files will be included if directly mentioned.
.gitignore bypassSimilarly, file and folder @mentions do not respect .gitignore rules when fetching content.
Git command respectGit-related mentions (@git-changes, @commit-hash) do respect .gitignore since they rely on Git commands.