From 15dff1d59f0e051df97de9ef1cc63acfb930aa9a Mon Sep 17 00:00:00 2001 From: yyh Date: Fri, 13 Feb 2026 14:20:32 +0800 Subject: [PATCH] refactor(web): use granular zustand selector for sandbox toggle --- .../visual-editor/edit-card/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/index.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/index.tsx index 311e2a5fa9..dd7e7adf6f 100644 --- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/index.tsx +++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/index.tsx @@ -84,8 +84,8 @@ const EditCard: FC = ({ const blurWithActions = useRef(false) const isSandboxRuntime = useAppStore(s => s.appDetail?.runtime_type === 'sandboxed') - const features = useFeatures(s => s.features) - const isSupportSandbox = isSandboxRuntime || features.sandbox?.enabled === true + const isSandboxFeatureEnabled = useFeatures(s => s.features.sandbox?.enabled === true) + const isSupportSandbox = isSandboxRuntime || isSandboxFeatureEnabled const maximumDepthReached = depth === JSON_SCHEMA_MAX_DEPTH const disableAddBtn = maximumDepthReached || (currentFields.type !== Type.object && currentFields.type !== ArrayType.object)