From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001 From: wwf <yearningwang@iqtogether.com> Date: 星期三, 04 六月 2025 15:17:49 +0800 Subject: [PATCH] 初始化 --- app/components/workflow/nodes/_base/hooks/use-available-var-list.ts | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/components/workflow/nodes/_base/hooks/use-available-var-list.ts b/app/components/workflow/nodes/_base/hooks/use-available-var-list.ts index e1a6a8b..bd17bb1 100644 --- a/app/components/workflow/nodes/_base/hooks/use-available-var-list.ts +++ b/app/components/workflow/nodes/_base/hooks/use-available-var-list.ts @@ -13,7 +13,6 @@ passedInAvailableNodes?: Node[] } -// TODO: loop type? const useAvailableVarList = (nodeId: string, { onlyLeafNodeVar, filterVar, @@ -24,11 +23,11 @@ onlyLeafNodeVar: false, filterVar: () => true, }) => { - const { getTreeLeafNodes, getBeforeNodesInSameBranchIncludeParent } = useWorkflow() + const { getTreeLeafNodes, getBeforeNodesInSameBranch } = useWorkflow() const { getNodeAvailableVars } = useWorkflowVariables() const isChatMode = useIsChatMode() - const availableNodes = passedInAvailableNodes || (onlyLeafNodeVar ? getTreeLeafNodes(nodeId) : getBeforeNodesInSameBranchIncludeParent(nodeId)) + const availableNodes = passedInAvailableNodes || (onlyLeafNodeVar ? getTreeLeafNodes(nodeId) : getBeforeNodesInSameBranch(nodeId)) const { parentNode: iterationNode, @@ -46,7 +45,7 @@ return { availableVars, availableNodes, - availableNodesWithParent: availableNodes, + availableNodesWithParent: iterationNode ? [...availableNodes, iterationNode] : availableNodes, } } -- Gitblit v1.8.0