From 0319e35b4d4b38010d1b404e9f36225467ea6678 Mon Sep 17 00:00:00 2001 From: twwu Date: Thu, 27 Mar 2025 16:06:10 +0800 Subject: [PATCH] fix: reset schema and view on error in JSON schema generation --- .../json-schema-config-modal/json-schema-generator/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/index.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/index.tsx index c76d01cdce..202c5f1fc9 100644 --- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/index.tsx +++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/index.tsx @@ -106,6 +106,8 @@ export const JsonSchemaGenerator: FC = ({ type: 'error', message: error, }) + setSchema(null) + setView(GeneratorView.promptEditor) return } return output