mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Mark code-workspace files as protected (#7403)
This commit is contained in:
parent
0cfd314c00
commit
296edfc829
2 changed files with 10 additions and 1 deletions
|
|
@ -19,9 +19,10 @@ export class RooProtectedController {
|
|||
".clinerules*",
|
||||
".roo/**",
|
||||
".vscode/**",
|
||||
"*.code-workspace",
|
||||
".rooprotected", // For future use
|
||||
"AGENTS.md",
|
||||
"AGENT.md", // Alternative singular form for compatibility
|
||||
"AGENT.md",
|
||||
]
|
||||
|
||||
constructor(cwd: string) {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,13 @@ describe("RooProtectedController", () => {
|
|||
expect(controller.isWriteProtected(".vscode/tasks.json")).toBe(true)
|
||||
})
|
||||
|
||||
it("should protect .code-workspace files", () => {
|
||||
expect(controller.isWriteProtected("myproject.code-workspace")).toBe(true)
|
||||
expect(controller.isWriteProtected("pentest.code-workspace")).toBe(true)
|
||||
expect(controller.isWriteProtected(".code-workspace")).toBe(true)
|
||||
expect(controller.isWriteProtected("folder/workspace.code-workspace")).toBe(true)
|
||||
})
|
||||
|
||||
it("should protect AGENTS.md file", () => {
|
||||
expect(controller.isWriteProtected("AGENTS.md")).toBe(true)
|
||||
})
|
||||
|
|
@ -149,6 +156,7 @@ describe("RooProtectedController", () => {
|
|||
".clinerules*",
|
||||
".roo/**",
|
||||
".vscode/**",
|
||||
"*.code-workspace",
|
||||
".rooprotected",
|
||||
"AGENTS.md",
|
||||
"AGENT.md",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue