From a75e77e1565b8f503a6a91398b33a5fe270c3b61 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 18 Mar 2025 15:15:29 +0800 Subject: [PATCH] fix: can not set llm struct the right var type --- .../components/workflow/hooks/use-workflow-variables.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/web/app/components/workflow/hooks/use-workflow-variables.ts b/web/app/components/workflow/hooks/use-workflow-variables.ts index fb6c466e03..4be9488935 100644 --- a/web/app/components/workflow/hooks/use-workflow-variables.ts +++ b/web/app/components/workflow/hooks/use-workflow-variables.ts @@ -8,7 +8,7 @@ import type { ValueSelector, Var, } from '@/app/components/workflow/types' -import { useIsChatMode, useWorkflow } from './use-workflow' +import { useIsChatMode } from './use-workflow' import { useStoreApi } from 'reactflow' export const useWorkflowVariables = () => { @@ -80,7 +80,6 @@ export const useWorkflowVariableType = () => { const { getNodes, } = store.getState() - const { getBeforeNodesInSameBranch } = useWorkflow() const { getCurrentVariableType } = useWorkflowVariables() const isChatMode = useIsChatMode() @@ -92,12 +91,10 @@ export const useWorkflowVariableType = () => { nodeId: string, valueSelector: ValueSelector, }) => { - // debugger const node = getNodes().find(n => n.id === nodeId) - // console.log(nodeId, valueSelector) const isInIteration = !!node?.data.isInIteration const iterationNode = isInIteration ? getNodes().find(n => n.id === node.parentId) : null - const availableNodes = getBeforeNodesInSameBranch(nodeId) + const availableNodes = [node] const type = getCurrentVariableType({ parentNode: iterationNode,