Skip to content

Commit 2ec362a

Browse files
authored
Documentation for PR: 4075 (#210)
1 parent e2885ac commit 2ec362a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/features/rooignore.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The `.rooignore` file is a key feature for managing Roo Code's interaction with
1010

1111
* **Purpose**: To protect sensitive information, prevent accidental changes to build artifacts or large assets, and generally define Roo's operational scope within your workspace.
1212
* **How to Use**: Create a file named `.rooignore` in the root directory of your VS Code workspace. List patterns in this file to tell Roo which files and directories to ignore.
13+
* **Scope**: `.rooignore` affects both Roo's tools and context mentions (like `@directory` attachments).
1314

1415
Roo actively monitors the `.rooignore` file. Any changes you make are reloaded automatically, ensuring Roo always uses the most current rules. The `.rooignore` file itself is always implicitly ignored, so Roo cannot change its own access rules.
1516

@@ -43,9 +44,14 @@ These tools directly check `.rooignore` before any file operation. If a file is
4344

4445
### File Discovery and Listing
4546

46-
* **[`list_files`](/advanced-usage/available-tools/list-files) Tool**: When Roo lists files, ignored files are typically omitted or marked with a 🔒 symbol (see "User Experience" below).
47+
* **[`list_files`](/advanced-usage/available-tools/list-files) Tool & `@directory` Attachments**: When Roo lists files or when you use `@directory` attachments, ignored files are omitted or marked with a 🔒 symbol (see "User Experience" below). Both use identical filtering logic.
4748
* **Environment Details**: Information about your workspace (like open tabs and project structure) provided to Roo is filtered to exclude or mark ignored items.
4849

50+
### Context Mentions
51+
52+
* **`@directory` Attachments**: Directory contents respect `.rooignore` patterns. Ignored files are filtered out or marked with `[🔒]` prefix depending on the `showRooIgnoredFiles` setting.
53+
* **Single File Mentions**: Ignored files return "(File is ignored by .rooignore)" instead of content.
54+
4955
### Command Execution
5056

5157
* **[`execute_command`](/advanced-usage/available-tools/execute-command) Tool**: This tool checks if a command (from a predefined list like `cat` or `grep`) targets an ignored file. If so, execution is blocked.
@@ -58,7 +64,8 @@ These tools directly check `.rooignore` before any file operation. If a file is
5864

5965
## User Experience and Notifications
6066

61-
* **Visual Cue (🔒)**: In file listings, files ignored by `.rooignore` may be marked with a lock symbol (🔒), depending on the `showRooIgnoredFiles` setting (defaults to `true`).
67+
* **Visual Cue (🔒)**: In file listings and `@directory` attachments, files ignored by `.rooignore` may be marked with a lock symbol (🔒), depending on the `showRooIgnoredFiles` setting (defaults to `true`).
68+
* **Ignore Messages**: Single file mentions return "(File is ignored by .rooignore)" instead of content.
6269
* **Error Messages**: If a tool operation is blocked, Roo receives an error: `"Access to [file_path] is blocked by the .rooignore file settings. You must try to continue in the task without using this file, or ask the user to update the .rooignore file."`
6370
* **Chat Notifications**: You will typically see a notification in the Roo chat interface when an action is blocked due to `.rooignore`.
6471

0 commit comments

Comments
 (0)