Validation fixes

This commit is contained in:
Matt Rubens
2025-01-24 10:03:35 -05:00
parent 569e104bf2
commit 5f8a8887fb
6 changed files with 108 additions and 98 deletions

View File

@@ -22,7 +22,7 @@ const GroupOptionsSchema = z.object({
},
{ message: "Invalid regular expression pattern" },
),
fileRegexDescription: z.string().optional(),
description: z.string().optional(),
})
// Schema for a group entry - either a tool group string or a tuple of [group, options]

View File

@@ -135,7 +135,7 @@ describe("CustomModeSchema", () => {
roleDefinition: "Documentation editing mode",
groups: [
"read",
["edit", { fileRegex: "\\.(md|txt)$", fileRegexDescription: "Documentation files only" }],
["edit", { fileRegex: "\\.(md|txt)$", description: "Documentation files only" }],
"browser",
],
}