Skip to content

Commit 7b83590

Browse files
committed
* In elicitation.test.ts
- In "should succeed with valid selection in multi-select untitled enum" - rename prop to colors * In types.ts - add string array to ElicitResultSchema
1 parent 2f0cb57 commit 7b83590

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/server/elicitation.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ function testElicitationFlow(validatorProvider: typeof ajvProvider | typeof cfWo
586586
client.setRequestHandler(ElicitRequestSchema, _request => ({
587587
action: 'accept',
588588
content: {
589-
color: ['Red', 'Blue']
589+
colors: ['Red', 'Blue']
590590
}
591591
}));
592592

@@ -597,7 +597,7 @@ function testElicitationFlow(validatorProvider: typeof ajvProvider | typeof cfWo
597597
requestedSchema: {
598598
type: 'object',
599599
properties: {
600-
color: {
600+
colors: {
601601
type: 'array',
602602
title: 'Color Selection',
603603
description: 'Choose your favorite colors',
@@ -609,13 +609,13 @@ function testElicitationFlow(validatorProvider: typeof ajvProvider | typeof cfWo
609609
}
610610
}
611611
},
612-
required: ['color']
612+
required: ['colors']
613613
}
614614
})
615615
).resolves.toEqual({
616616
action: 'accept',
617617
content: {
618-
color: ['Red', 'Blue']
618+
colors: ['Red', 'Blue']
619619
}
620620
});
621621
});

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ export const ElicitResultSchema = ResultSchema.extend({
13661366
* The submitted form data, only present when action is "accept".
13671367
* Contains values matching the requested schema.
13681368
*/
1369-
content: z.record(z.union([z.string(), z.number(), z.boolean()])).optional()
1369+
content: z.record(z.union([z.string(), z.number(), z.boolean(), z.array(z.string())])).optional()
13701370
});
13711371

13721372
/* Autocomplete */

0 commit comments

Comments
 (0)