From f0e81e3918b2b2f49db88092cf3fed3f70d544e1 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 10 Sep 2024 15:22:44 +0800 Subject: [PATCH] fix: doc extract and node isconversation item --- web/app/components/workflow/nodes/doc-extractor/node.tsx | 8 +++++--- web/app/components/workflow/nodes/list-filter/node.tsx | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/web/app/components/workflow/nodes/doc-extractor/node.tsx b/web/app/components/workflow/nodes/doc-extractor/node.tsx index 8558ca81eb..655162acab 100644 --- a/web/app/components/workflow/nodes/doc-extractor/node.tsx +++ b/web/app/components/workflow/nodes/doc-extractor/node.tsx @@ -4,10 +4,10 @@ import { useNodes } from 'reactflow' import { useTranslation } from 'react-i18next' import NodeVariableItem from '../variable-assigner/components/node-variable-item' import { type DocExtractorNodeType } from './types' -import { isENV, isSystemVar } from '@/app/components/workflow/nodes/_base/components/variable/utils' +import { isConversationVar, isENV, isSystemVar } from '@/app/components/workflow/nodes/_base/components/variable/utils' import { BlockEnum, type Node, type NodeProps } from '@/app/components/workflow/types' -const i18nPrefix = 'workflow.nodes.assigner' +const i18nPrefix = 'workflow.nodes.docExtractor' const NodeComponent: FC> = ({ data, @@ -22,14 +22,16 @@ const NodeComponent: FC> = ({ const isSystem = isSystemVar(variable) const isEnv = isENV(variable) + const isChatVar = isConversationVar(variable) const node = isSystem ? nodes.find(node => node.data.type === BlockEnum.Start) : nodes.find(node => node.id === variable[0]) const varName = isSystem ? `sys.${variable[variable.length - 1]}` : variable.slice(1).join('.') return (
-
{t(`${i18nPrefix}.assignedVariable`)}
+
{t(`${i18nPrefix}.inputVar`)}
diff --git a/web/app/components/workflow/nodes/list-filter/node.tsx b/web/app/components/workflow/nodes/list-filter/node.tsx index 2bfde0f9b4..721e13b2d2 100644 --- a/web/app/components/workflow/nodes/list-filter/node.tsx +++ b/web/app/components/workflow/nodes/list-filter/node.tsx @@ -4,7 +4,7 @@ import { useNodes } from 'reactflow' import { useTranslation } from 'react-i18next' import NodeVariableItem from '../variable-assigner/components/node-variable-item' import { type ListFilterNodeType } from './types' -import { isENV, isSystemVar } from '@/app/components/workflow/nodes/_base/components/variable/utils' +import { isConversationVar, isENV, isSystemVar } from '@/app/components/workflow/nodes/_base/components/variable/utils' import { BlockEnum, type Node, type NodeProps } from '@/app/components/workflow/types' const i18nPrefix = 'workflow.nodes.listFilter' @@ -22,6 +22,7 @@ const NodeComponent: FC> = ({ const isSystem = isSystemVar(variable) const isEnv = isENV(variable) + const isChatVar = isConversationVar(variable) const node = isSystem ? nodes.find(node => node.data.type === BlockEnum.Start) : nodes.find(node => node.id === variable[0]) const varName = isSystem ? `sys.${variable[variable.length - 1]}` : variable.slice(1).join('.') return ( @@ -30,6 +31,7 @@ const NodeComponent: FC> = ({