mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-06 03:20:41 +00:00
fix(ChatData): Fix execution failure error after manually updating SQL (#1812)
Co-authored-by: hec <he.erchuang@fujitsu.com>
This commit is contained in:
@@ -460,7 +460,7 @@ function DbEditor() {
|
|||||||
if (!value) {
|
if (!value) {
|
||||||
return { sql: '', thoughts: '' };
|
return { sql: '', thoughts: '' };
|
||||||
}
|
}
|
||||||
const match = value && value.match(/(--.*)\n([\s\S]*)/);
|
const match = value && value.match(/(--.*)?\n?([\s\S]*)/);
|
||||||
let thoughts = '';
|
let thoughts = '';
|
||||||
let sql;
|
let sql;
|
||||||
if (match && match.length >= 3) {
|
if (match && match.length >= 3) {
|
||||||
|
Reference in New Issue
Block a user