Context mentions

Context mentions let you reference specific elements of your project directly in your conversations with Bob. By using the @ symbol, you can point Bob to files, folders, problems, and other project components, enabling more accurate and efficient assistance.

Types of mentions

With context mentions, you can reference various elements of your project:

Mention typeFormatDescriptionExample usage
File@/path/to/file.tsIncludes file contents in request contextExplain 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 IBM Bob Problems panel diagnostics@problems Fix all errors in my code
Terminal@terminalIncludes recent terminal command and outputFix the errors shown in @terminal
Git commit@a1b2c3dReferences specific commit by hashWhat changed in commit @a1b2c3d?
Git changes@git-changesShows uncommitted changesSuggest a message for @git-changes
URL@https://example.comImports website contentSummarize @https://docusaurus.io/

File mentions

File mentions are the most commonly used type, letting you include the contents of specific files in your conversation with Bob.

CapabilityDetails
Format@/path/to/file.ts (always start with / from workspace root)
ProvidesComplete file contents with line numbers
Works withText 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
Tip:

For large files, you can mention specific sections by using the file's path followed by line numbers, like @/src/app.js:10-20 to include only lines 10-20.

Folder mentions

With folder mentions, you can reference multiple files at once, providing broader context from a 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
Note:

Folder mentions are non-recursive, meaning they only include files directly in the specified folder, not in subfolders.

Problems mention

The problems mention imports diagnostics from IBM Bob's Problems panel, helping you resolve multiple issues at once.

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

Example usage: @problems Can you help me fix all these issues?

Terminal mention

Terminal mentions capture recent command output, helping you debug build errors or analyze command results.

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

When troubleshooting a build failure, try What is wrong with @terminal? to get immediate insights into the error without manually copying the output.

Git mentions

Git mentions help you work with version control by referencing commits and changes.

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

Example usage: What's the purpose of @a1b2c3d? or Suggest a commit message for @git-changes

URL mentions

URL mentions let you reference external web content in your conversations with Bob.

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
Tip:

URL mentions are useful for referencing documentation. Try Can you explain @https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise to get help understanding a concept with the official docs as context.

Use context mentions

Type @ in the chat input to trigger the suggestions dropdown.

Continue typing to filter suggestions or use arrow keys to navigate.

Select with Enter key or mouse click.

Combine multiple mentions in a request: "Fix @problems in @/src/component.ts"

Tip:

Highlight text and use the keyboard shortcut + L to add it to the chat.

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 you can include their content if manually typed.

Tip:

You can combine multiple mentions in a single request. Try Compare @/src/v1/api.js with @/src/v2/api.js and explain the differences.

Important behaviors

Ignore file interactions

Context mentions have specific behaviors when interacting with ignored files:

BehaviorDescription
.bobignore bypassFile and folder @mentions bypass .bobignore 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.

Context mentions bypass ignore rules, so you can reference specific files that would normally be ignored by Bob or Git. This capability is particularly useful when you need to discuss generated files or other typically ignored content.

Putting it all together

Context mentions enhance your interactions with Bob by providing precise references to your project's elements. Instead of copying and pasting code or describing file locations, you can directly reference what you are discussing.

Effective combinations of different mention types:

  • Fix @problems in @/src/components and explain what was wrong
  • Review @git-changes and suggest improvements
  • Compare @/v1/api.js with @https://api-docs.example.com and check for inconsistencies

By using context mentions effectively, you can communicate more precisely with Bob and receive more targeted assistance.

How is this topic?