-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for a .rooignore file #1367
base: main
Are you sure you want to change the base?
Conversation
|
The pull request introduces a significant number of changes related to the support for a .rooignore file, including the integration of the RooIgnoreController and associated tests. Given the size and scope of the changes (1375 lines added across 12 files), it might be beneficial to split this pull request into smaller, more manageable parts. Here are some suggestions on how the changes could be split:
This approach can help in reviewing and testing the changes more effectively. Please consider splitting the pull request accordingly. |
@@ -70,6 +70,10 @@ export async function addCustomInstructions( | |||
rules.push(`# Rules from ${modeRuleFile}:\n${modeRuleContent}`) | |||
} | |||
|
|||
if (options.rooIgnoreInstructions) { | |||
rules.push(options.rooIgnoreInstructions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure formatting of .rooignore
instructions aligns with other rule sections.
rules.push(options.rooIgnoreInstructions) | |
rules.push(`# .rooignore Instructions:\n${options.rooIgnoreInstructions}`) |
Context
We need to support a .rooignore file so users can control which files the LLMs can access.
Implementation
This is very lightly adapted from the upstream Cline implementation.
Screenshots
How to Test
Populate a .rooignore file, and then ask Roo to read/write files that it's not allowed.
Important
Adds
.rooignore
file support to control LLM file access, withRooIgnoreController
managing ignore patterns and integrated into system prompts and file operations..rooignore
file support to restrict LLM file access.RooIgnoreController
class inRooIgnoreController.ts
manages ignore patterns and file access validation.Cline.ts
to initialize and useRooIgnoreController
for file access checks..rooignore
instructions into system prompts insystem.ts
andClineProvider.ts
.RooIgnoreController
inRooIgnoreController.test.ts
andRooIgnoreController.security.test.ts
.RooIgnoreController
in__mocks__/RooIgnoreController.ts
.responses-rooignore.test.ts
to test response formatting with.rooignore
.regexSearchFiles
inripgrep/index.ts
andparseSourceCodeForDefinitionsTopLevel
intree-sitter/index.ts
to useRooIgnoreController
for filtering results.rooignore_error
toClineSay
inExtensionMessage.ts
.This description was created by
for 0fc0ae9. It will automatically update as commits are pushed.