From 77950e48c76f4a3b29d01831d43039caba29888a Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 18 十一月 2025 14:12:42 +0800
Subject: [PATCH] 修改
---
app/components/workflow/hooks/use-workflow-variables.ts | 39 ---------------------------------------
1 files changed, 0 insertions(+), 39 deletions(-)
diff --git a/app/components/workflow/hooks/use-workflow-variables.ts b/app/components/workflow/hooks/use-workflow-variables.ts
index 35637bc..feadaf8 100644
--- a/app/components/workflow/hooks/use-workflow-variables.ts
+++ b/app/components/workflow/hooks/use-workflow-variables.ts
@@ -8,8 +8,6 @@
ValueSelector,
Var,
} from '@/app/components/workflow/types'
-import { useIsChatMode } from './use-workflow'
-import { useStoreApi } from 'reactflow'
export const useWorkflowVariables = () => {
const { t } = useTranslation()
@@ -46,7 +44,6 @@
parentNode,
valueSelector,
isIterationItem,
- isLoopItem,
availableNodes,
isChatMode,
isConstant,
@@ -54,7 +51,6 @@
valueSelector: ValueSelector
parentNode?: Node | null
isIterationItem?: boolean
- isLoopItem?: boolean
availableNodes: any[]
isChatMode: boolean
isConstant?: boolean
@@ -63,7 +59,6 @@
parentNode,
valueSelector,
isIterationItem,
- isLoopItem,
availableNodes,
isChatMode,
isConstant,
@@ -76,38 +71,4 @@
getNodeAvailableVars,
getCurrentVariableType,
}
-}
-
-export const useWorkflowVariableType = () => {
- const store = useStoreApi()
- const {
- getNodes,
- } = store.getState()
- const { getCurrentVariableType } = useWorkflowVariables()
-
- const isChatMode = useIsChatMode()
-
- const getVarType = ({
- nodeId,
- valueSelector,
- }: {
- nodeId: string,
- valueSelector: ValueSelector,
- }) => {
- const node = getNodes().find(n => n.id === nodeId)
- const isInIteration = !!node?.data.isInIteration
- const iterationNode = isInIteration ? getNodes().find(n => n.id === node.parentId) : null
- const availableNodes = [node]
-
- const type = getCurrentVariableType({
- parentNode: iterationNode,
- valueSelector,
- availableNodes,
- isChatMode,
- isConstant: false,
- })
- return type
- }
-
- return getVarType
}
--
Gitblit v1.8.0