1 parent
7a7edfb2b8
commit
72f32d630f
6 files changed
+140
-5
No files matched your search
@@ -943,9 +943,16 @@ function requestActiveEditorExecute(source?: "pointer" | "keyboard", tabId?: str
|
||||
void tryExecute(undefined, targetTabId ? { tabId: targetTabId } : undefined);
|
||||
}
|
||||
|
||||
function requestActiveEditorExecuteInNewResultTab() {
|
||||
if (contentAreaRef.value?.requestQueryEditorExecuteInNewResultTab?.()) return;
|
||||
void tryExecuteInNewResultTab();
|
||||
function requestActiveEditorExecuteInNewResultTab(source?: "pointer" | "keyboard", tabId?: string) {
|
||||
const snapshot = pendingToolbarExecutionSnapshot.value;
|
||||
pendingToolbarExecutionSnapshot.value = undefined;
|
||||
const targetTabId = tabId ?? (source === "pointer" ? snapshot?.tabId : undefined);
|
||||
if (source === "pointer" && snapshot && snapshot.tabId === targetTabId) {
|
||||
void tryExecuteInNewResultTab(snapshot, { tabId: targetTabId });
|
||||
return;
|
||||
}
|
||||
if (contentAreaRef.value?.requestQueryEditorExecuteInNewResultTab?.(targetTabId)) return;
|
||||
void tryExecuteInNewResultTab(undefined, targetTabId ? { tabId: targetTabId } : undefined);
|
||||
}
|
||||
|
||||
const toolbarAgentDriverUpdateCount = computed(() => Math.max(agentDriverUpdateCount.value, componentUpdates.driverUpdateCount.value));
|
||||
@@ -989,6 +996,7 @@ provide(EDITOR_TOOLBAR_ACTIONS, {
|
||||
databaseRequiredSignalFor: (tabId: string) => (databaseRequiredTabId.value === tabId ? databaseRequiredSignal.value : 0),
|
||||
captureExecutionSnapshot: captureActiveEditorExecutionSnapshot,
|
||||
toolbarExecute: requestActiveEditorExecute,
|
||||
toolbarExecuteInNewResultTab: requestActiveEditorExecuteInNewResultTab,
|
||||
cancelExecution: (tabId: string) => cancelActiveExecution(tabId),
|
||||
explain: (tabId: string) => tryExplain(undefined, { tabId }),
|
||||
formatSql: formatActiveSql,
|
||||
|
||||
Reference in new issue
Block a user