fix: pass SQL directly in AI execute to avoid stale state (#153)
When executing SQL from the AI panel, pass the SQL string directly to tryExecute() instead of relying on the executableSql computed property, which could use stale selectedSql or cursorPos values.
This commit is contained in:
1 parent
ae890092dd
commit
92fe47b913
2 files changed
+16
-3
No files matched your search
+2
-1
@@ -320,7 +320,8 @@ function onAiReplaceSql(sql: string) {
|
||||
function onAiExecuteSql(sql: string) {
|
||||
const tabId = ensureQueryTab();
|
||||
queryStore.updateSql(tabId, sql);
|
||||
nextTick(() => tryExecute());
|
||||
selectedSql.value = "";
|
||||
nextTick(() => tryExecute(sql));
|
||||
}
|
||||
|
||||
function handleKeydown(e: KeyboardEvent) {
|
||||
|
||||
Reference in new issue
Block a user