From 8754b321df79bd615b7aff1a249abf7abe506d89 Mon Sep 17 00:00:00 2001 From: zhsama Date: Sun, 25 Jan 2026 16:30:13 +0800 Subject: [PATCH] fix: Add sandbox feature to workflow features mapping --- web/app/components/workflow-app/components/workflow-main.tsx | 1 + web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts | 1 + web/app/components/workflow/features.tsx | 1 + web/contract/console/workflow.ts | 2 ++ 4 files changed, 5 insertions(+) diff --git a/web/app/components/workflow-app/components/workflow-main.tsx b/web/app/components/workflow-app/components/workflow-main.tsx index 828c7fab08..f64aaa09b5 100644 --- a/web/app/components/workflow-app/components/workflow-main.tsx +++ b/web/app/components/workflow-app/components/workflow-main.tsx @@ -122,6 +122,7 @@ const WorkflowMain = ({ citation: features.retriever_resource || { enabled: false }, moderation: features.sensitive_word_avoidance || { enabled: false }, annotationReply: features.annotation_reply || { enabled: false }, + sandbox: features.sandbox || { enabled: false }, } setFeatures(transformedFeatures) diff --git a/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts b/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts index bba5cb8f27..ffb07e50c3 100644 --- a/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts +++ b/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts @@ -67,6 +67,7 @@ export const useNodesSyncDraft = () => { retriever_resource: features.citation, sensitive_word_avoidance: features.moderation, file_upload: features.file, + sandbox: features.sandbox, } return { diff --git a/web/app/components/workflow/features.tsx b/web/app/components/workflow/features.tsx index 56b8b79ced..13eb1a7323 100644 --- a/web/app/components/workflow/features.tsx +++ b/web/app/components/workflow/features.tsx @@ -60,6 +60,7 @@ const Features = () => { retriever_resource: currentFeatures.citation, sensitive_word_avoidance: currentFeatures.moderation, file_upload: currentFeatures.file, + sandbox: currentFeatures.sandbox, } await updateFeatures({ diff --git a/web/contract/console/workflow.ts b/web/contract/console/workflow.ts index 2c70a58e25..f2eb76dd39 100644 --- a/web/contract/console/workflow.ts +++ b/web/contract/console/workflow.ts @@ -1,6 +1,7 @@ import type { FileUpload, RetrieverResource, + Runtime, SensitiveWordAvoidance, SpeechToText, SuggestedQuestionsAfterAnswer, @@ -20,6 +21,7 @@ export type WorkflowDraftFeaturesPayload = { retriever_resource?: RetrieverResource sensitive_word_avoidance?: SensitiveWordAvoidance file_upload?: FileUpload + sandbox?: Runtime } export const workflowDraftEnvironmentVariablesContract = base