From e1384679c43cf729d8e3adfa37a2e67a2af850f9 Mon Sep 17 00:00:00 2001 From: ACAne0320 Date: Thu, 19 Jun 2025 21:45:32 +0800 Subject: [PATCH] fix: missing conversation and environment variables in DSL importing. --- web/app/components/workflow/index.tsx | 8 ++++++++ web/app/components/workflow/update-dsl-modal.tsx | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/web/app/components/workflow/index.tsx b/web/app/components/workflow/index.tsx index 549117faf7..15f33428cc 100644 --- a/web/app/components/workflow/index.tsx +++ b/web/app/components/workflow/index.tsx @@ -119,6 +119,8 @@ export const Workflow: FC = memo(({ setShowConfirm, setControlPromptEditorRerenderKey, setSyncWorkflowDraftHash, + setConversationVariables, + setEnvironmentVariables, } = workflowStore.getState() const { handleSyncWorkflowDraft, @@ -139,6 +141,12 @@ export const Workflow: FC = memo(({ if (v.payload.hash) setSyncWorkflowDraftHash(v.payload.hash) + if (v.payload.conversation_variables) + setConversationVariables(v.payload.conversation_variables) + + if (v.payload.environment_variables) + setEnvironmentVariables(v.payload.environment_variables) + onWorkflowDataUpdate?.(v.payload) setTimeout(() => setControlPromptEditorRerenderKey(Date.now())) diff --git a/web/app/components/workflow/update-dsl-modal.tsx b/web/app/components/workflow/update-dsl-modal.tsx index b789e3b2fd..00c36cce90 100644 --- a/web/app/components/workflow/update-dsl-modal.tsx +++ b/web/app/components/workflow/update-dsl-modal.tsx @@ -86,6 +86,8 @@ const UpdateDSLModal = ({ graph, features, hash, + conversation_variables, + environment_variables, } = await fetchWorkflowDraft(`/apps/${app_id}/workflows/draft`) const { nodes, edges, viewport } = graph @@ -122,6 +124,8 @@ const UpdateDSLModal = ({ viewport, features: newFeatures, hash, + conversation_variables: conversation_variables || [], + environment_variables: environment_variables || [], }, } as any) }, [eventEmitter])