mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
Check rooignore for insert_content and search_and_replace (#4094)
This commit is contained in:
parent
aa6265462e
commit
4cf240f3db
2 changed files with 16 additions and 0 deletions
|
|
@ -58,6 +58,14 @@ export async function insertContentTool(
|
|||
return
|
||||
}
|
||||
|
||||
const accessAllowed = cline.rooIgnoreController?.validateAccess(relPath)
|
||||
|
||||
if (!accessAllowed) {
|
||||
await cline.say("rooignore_error", relPath)
|
||||
pushToolResult(formatResponse.toolError(formatResponse.rooIgnoreError(relPath)))
|
||||
return
|
||||
}
|
||||
|
||||
const absolutePath = path.resolve(cline.cwd, relPath)
|
||||
const fileExists = await fileExistsAtPath(absolutePath)
|
||||
|
||||
|
|
|
|||
|
|
@ -115,6 +115,14 @@ export async function searchAndReplaceTool(
|
|||
endLine: endLine,
|
||||
}
|
||||
|
||||
const accessAllowed = cline.rooIgnoreController?.validateAccess(validRelPath)
|
||||
|
||||
if (!accessAllowed) {
|
||||
await cline.say("rooignore_error", validRelPath)
|
||||
pushToolResult(formatResponse.toolError(formatResponse.rooIgnoreError(validRelPath)))
|
||||
return
|
||||
}
|
||||
|
||||
const absolutePath = path.resolve(cline.cwd, validRelPath)
|
||||
const fileExists = await fileExistsAtPath(absolutePath)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue