fix(debug): fix Zod 4 compatibility in tool-executor
In Zod 4, _def.defaultValue is the value itself, not a function. This was causing 'curr._def.defaultValue is not a function' error when the debug dashboard tried to extract tool definitions.
This commit is contained in:
@@ -147,7 +147,8 @@ export class ToolExecutor {
|
||||
curr = curr._def.schema
|
||||
}
|
||||
else if (typeId === 'ZodDefault') {
|
||||
defaultValue = curr._def.defaultValue()
|
||||
// In Zod 4, defaultValue is the value itself, not a function
|
||||
defaultValue = curr._def.defaultValue
|
||||
curr = curr._def.innerType
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user