mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
fix(orchestrator): allow reading global skill SKILL.md paths
This commit is contained in:
parent
249013522b
commit
0e9286e5c2
2 changed files with 14 additions and 2 deletions
|
|
@ -192,7 +192,12 @@ export const DEFAULT_MODES: readonly ModeConfig[] = [
|
|||
[
|
||||
"read",
|
||||
{
|
||||
fileRegex: "^\\.roo\\/skills(-[a-zA-Z0-9-]+)?\\/[^\\/]+\\/SKILL\\.md$",
|
||||
// Allow both workspace-relative and absolute skill paths (cross-platform).
|
||||
// Examples:
|
||||
// - .roo/skills/example-skill/SKILL.md
|
||||
// - /Users/alice/.roo/skills/example-skill/SKILL.md
|
||||
// - C:\\Users\\alice\\.roo\\skills\\example-skill\\SKILL.md
|
||||
fileRegex: "(^|.*[\\\\/])\\.roo[\\\\/]skills(-[a-zA-Z0-9-]+)?[\\\\/][^\\\\/]+[\\\\/]SKILL\\.md$",
|
||||
description: "Skill definition files only",
|
||||
},
|
||||
],
|
||||
|
|
|
|||
|
|
@ -473,7 +473,8 @@ describe("FileRestrictionError", () => {
|
|||
[
|
||||
"read",
|
||||
{
|
||||
fileRegex: "^\\.roo\\/skills(-[a-zA-Z0-9-]+)?\\/[^\\/]+\\/SKILL\\.md$",
|
||||
fileRegex:
|
||||
"(^|.*[\\\\/])\\.roo[\\\\/]skills(-[a-zA-Z0-9-]+)?[\\\\/][^\\\\/]+[\\\\/]SKILL\\.md$",
|
||||
description: "Skill definition files only",
|
||||
},
|
||||
],
|
||||
|
|
@ -485,6 +486,12 @@ describe("FileRestrictionError", () => {
|
|||
}),
|
||||
).toBe(true)
|
||||
|
||||
expect(
|
||||
isToolAllowedForMode("read_file", "orchestrator", [], undefined, {
|
||||
files: [{ path: "/Users/test/.roo/skills/example-skill/SKILL.md" }],
|
||||
}),
|
||||
).toBe(true)
|
||||
|
||||
expect(() =>
|
||||
isToolAllowedForMode("read_file", "orchestrator", [], undefined, {
|
||||
files: [{ path: "src/index.ts" }],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue