feat: Add support for array[message](List[promptMessage]) variable type

in workflow
This commit is contained in:
zhsama
2026-01-26 17:34:01 +08:00
parent 5ac70633a2
commit ec5964c419
9 changed files with 36 additions and 7 deletions

View File

@ -23,7 +23,7 @@ export const validateJSONSchema = (schema: any, type: string) => {
const result = jsonSchema.safeParse(schema)
return result
}
else if (type === 'array[object]') {
else if (type === 'array[object]' || type === 'array[message]') {
const result = arrayJsonSchema.safeParse(schema)
return result
}
@ -31,3 +31,9 @@ export const validateJSONSchema = (schema: any, type: string) => {
return { success: true } as any
}
}
export const formatVarTypeLabel = (valueType?: string) => {
if (valueType === 'array[message]')
return 'List[promptMessage]'
return valueType || ''
}