Skip to content

Commit ad1e9a8

Browse files
authored
Add enum support to configuration schema (#9247)
1 parent 8d14e90 commit ad1e9a8

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

packages/build/src/__tests__/index.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ describe("generatePackageJson", () => {
100100
default: "",
101101
description: "%settings.customStoragePath.description%",
102102
},
103+
"roo-cline.toolProtocol": {
104+
type: "string",
105+
enum: ["xml", "native"],
106+
default: "xml",
107+
description: "%settings.toolProtocol.description%",
108+
},
103109
},
104110
},
105111
},
@@ -213,6 +219,12 @@ describe("generatePackageJson", () => {
213219
default: "",
214220
description: "%settings.customStoragePath.description%",
215221
},
222+
"roo-code-nightly.toolProtocol": {
223+
type: "string",
224+
enum: ["xml", "native"],
225+
default: "xml",
226+
description: "%settings.toolProtocol.description%",
227+
},
216228
},
217229
},
218230
},

packages/build/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const configurationPropertySchema = z.object({
8686
})
8787
.optional(),
8888
properties: z.record(z.string(), z.any()).optional(),
89+
enum: z.array(z.any()).optional(),
8990
default: z.any().optional(),
9091
description: z.string(),
9192
})

0 commit comments

Comments
 (0)