mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
fix: iteration not support file item
This commit is contained in:
parent
81e57bcc73
commit
ff7a467a1a
|
@ -581,6 +581,16 @@ export const toNodeAvailableVars = ({
|
|||
environmentVariables,
|
||||
conversationVariables,
|
||||
})
|
||||
const itemChildren = itemType === VarType.file
|
||||
? {
|
||||
children: OUTPUT_FILE_SUB_VARIABLES.map((key) => {
|
||||
return {
|
||||
variable: key,
|
||||
type: key === 'size' ? VarType.number : VarType.string,
|
||||
}
|
||||
}),
|
||||
}
|
||||
: {}
|
||||
const iterationVar = {
|
||||
nodeId: iterationNode?.id,
|
||||
title: t('workflow.nodes.iteration.currentIteration'),
|
||||
|
@ -588,6 +598,7 @@ export const toNodeAvailableVars = ({
|
|||
{
|
||||
variable: 'item',
|
||||
type: itemType,
|
||||
...itemChildren,
|
||||
},
|
||||
{
|
||||
variable: 'index',
|
||||
|
|
Loading…
Reference in New Issue
Block a user