mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 09:28:04 +08:00
feat: Add support for array[message](List[promptMessage]) variable type
in workflow
This commit is contained in:
@ -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 || ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user