Skip to content

Commit ad74385

Browse files
committed
Documentation for PR: 4075
1 parent 4f082c7 commit ad74385

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

@@ -46,9 +47,14 @@ The [`insert_content`](/advanced-usage/available-tools/insert-content) and [`sea
4647

4748
### File Discovery and Listing
4849

49-
* **[`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).
50+
* **[`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.
5051
* **Environment Details**: Information about your workspace (like open tabs and project structure) provided to Roo is filtered to exclude or mark ignored items.
5152

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

5460
* **[`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.
@@ -62,7 +68,8 @@ The [`insert_content`](/advanced-usage/available-tools/insert-content) and [`sea
6268

6369
## User Experience and Notifications
6470

65-
* **Visual Cue (🔒)**: In file listings, files ignored by `.rooignore` may be marked with a lock symbol (🔒), depending on the `showRooIgnoredFiles` setting (defaults to `true`).
71+
* **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`).
72+
* **Ignore Messages**: Single file mentions return "(File is ignored by .rooignore)" instead of content.
6673
* **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."`
6774
* **Chat Notifications**: You will typically see a notification in the Roo chat interface when an action is blocked due to `.rooignore`.
6875

0 commit comments

Comments
 (0)