File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,8 +52,14 @@ export function generateToolMetrics(tools: ToolDefinition[]): ToolMetric[] {
5252 const transformedName = transformArgName ( zodType , name ) ;
5353 let argType = transformArgType ( zodType ) ;
5454
55- if ( zodType === 'ZodEnum' && schema . _def . values ?. length > 0 ) {
56- argType = validateEnumHomogeneity ( schema . _def . values ) ;
55+ if ( argType === 'enum' ) {
56+ let values ;
57+ if ( schema . _def . values ?. length > 0 ) {
58+ values = schema . _def . values ;
59+ } else {
60+ values = schema . _def . innerType . _def . values ;
61+ }
62+ argType = validateEnumHomogeneity ( values ) ;
5763 }
5864
5965 args . push ( {
Original file line number Diff line number Diff line change 6464 "args" : [
6565 {
6666 "name" : " networkConditions" ,
67- "argType" : " enum "
67+ "argType" : " string "
6868 },
6969 {
7070 "name" : " cpuThrottlingRate" ,
8080 },
8181 {
8282 "name" : " colorScheme" ,
83- "argType" : " enum "
83+ "argType" : " string "
8484 },
8585 {
8686 "name" : " viewport_length" ,
211211 "args" : [
212212 {
213213 "name" : " mode" ,
214- "argType" : " enum "
214+ "argType" : " string "
215215 },
216216 {
217217 "name" : " device" ,
218- "argType" : " enum "
218+ "argType" : " string "
219219 },
220220 {
221221 "name" : " outputDirPath_length" ,
291291 "args" : [
292292 {
293293 "name" : " type" ,
294- "argType" : " enum "
294+ "argType" : " string "
295295 },
296296 {
297297 "name" : " url_length" ,
303303 },
304304 {
305305 "name" : " handleBeforeUnload" ,
306- "argType" : " enum "
306+ "argType" : " string "
307307 },
308308 {
309309 "name" : " initScript_length" ,
454454 "args" : [
455455 {
456456 "name" : " format" ,
457- "argType" : " enum "
457+ "argType" : " string "
458458 },
459459 {
460460 "name" : " quality" ,
You can’t perform that action at this time.
0 commit comments