mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +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,
|
environmentVariables,
|
||||||
conversationVariables,
|
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 = {
|
const iterationVar = {
|
||||||
nodeId: iterationNode?.id,
|
nodeId: iterationNode?.id,
|
||||||
title: t('workflow.nodes.iteration.currentIteration'),
|
title: t('workflow.nodes.iteration.currentIteration'),
|
||||||
|
@ -588,6 +598,7 @@ export const toNodeAvailableVars = ({
|
||||||
{
|
{
|
||||||
variable: 'item',
|
variable: 'item',
|
||||||
type: itemType,
|
type: itemType,
|
||||||
|
...itemChildren,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
variable: 'index',
|
variable: 'index',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user