mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-28 16:09:17 +00:00
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:
+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