From 978f8c08b9b899ba22791efe8e9d1085f77b3f70 Mon Sep 17 00:00:00 2001 From: hec Date: Mon, 12 Aug 2024 14:59:11 +0900 Subject: [PATCH] Fix execution failure error after manually updating SQL. Update Code File:DB-GPT\web\components\chat\db-editor.tsx --- web/components/chat/db-editor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/chat/db-editor.tsx b/web/components/chat/db-editor.tsx index b790f6954..c8f36fe4c 100644 --- a/web/components/chat/db-editor.tsx +++ b/web/components/chat/db-editor.tsx @@ -463,7 +463,7 @@ function DbEditor() { if (!value) { return { sql: '', thoughts: '' }; } - const match = value && value.match(/(--.*)\n([\s\S]*)/); + const match = value && value.match(/(--.*)?\n?([\s\S]*)/); let thoughts = ''; let sql; if (match && match.length >= 3) {