From 4c2718a8699d21390f38fe16ab6653b4a3020197 Mon Sep 17 00:00:00 2001 From: Mminamiyama Date: Thu, 3 Jul 2025 09:51:54 +0800 Subject: [PATCH] refactor(prompt-editor): remove debug console logs from variable validation Clean up code by removing unnecessary console.log statements used for debugging variable validation in workflow variable block component. --- .../plugins/workflow-variable-block/component.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx index 688a6630dc..fa5f99dae5 100644 --- a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx +++ b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx @@ -73,16 +73,13 @@ const WorkflowVariableBlockComponent = ({ const isException = isExceptionVariable(varName, node?.type) let variableValid = true - if (isEnv) { - console.log('=============环境变量:', environmentVariables, variables) + if (isEnv) variableValid = environmentVariables.some(v => v.variable === `${variables?.[0] ?? ''}.${variables?.[1] ?? ''}`) - } - else if (isChatVar) { - console.log('=============会话变量:', conversationVariables, variables) + + else if (isChatVar) variableValid = conversationVariables.some(v => v.variable === `${variables?.[0] ?? ''}.${variables?.[1] ?? ''}`) - } - else { variableValid = !!node } + else variableValid = !!node const reactflow = useReactFlow() const store = useStoreApi()