From f1c57aa78b8b66ce0bd99e34ffafa2b955b70818 Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Thu, 19 Jun 2025 15:06:19 +0800 Subject: [PATCH] fix: workflow import sync env and conversation variables --- .../workflow-app/components/workflow-main.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/web/app/components/workflow-app/components/workflow-main.tsx b/web/app/components/workflow-app/components/workflow-main.tsx index a8627585ae..6be190c897 100644 --- a/web/app/components/workflow-app/components/workflow-main.tsx +++ b/web/app/components/workflow-app/components/workflow-main.tsx @@ -24,18 +24,23 @@ const WorkflowMain = ({ const workflowStore = useWorkflowStore() const handleWorkflowDataUpdate = useCallback((payload: any) => { - if (payload.features && featuresStore) { + const { + features, + conversation_variables, + environment_variables, + } = payload + if (features && featuresStore) { const { setFeatures } = featuresStore.getState() - setFeatures(payload.features) + setFeatures(features) } - if (payload.conversation_variables) { + if (conversation_variables) { const { setConversationVariables } = workflowStore.getState() - setConversationVariables(payload.conversation_variables) + setConversationVariables(conversation_variables) } - if (payload.environment_variables) { + if (environment_variables) { const { setEnvironmentVariables } = workflowStore.getState() - setEnvironmentVariables(payload.environment_variables) + setEnvironmentVariables(environment_variables) } }, [featuresStore, workflowStore])