feat(settings): add show execution target picker option and related UI elements
This commit is contained in:
1 parent
d7e52779c3
commit
9418e37c04
11 files changed
+51
-1
No files matched your search
@@ -319,6 +319,12 @@ function requestExecute() {
|
||||
const cursorPos = selection.head;
|
||||
const candidates = buildExecutionCandidates(doc, cursorPos, props.databaseType);
|
||||
if (candidates.length === 0) return false;
|
||||
if (!settingsStore.editorSettings.showExecutionTargetPicker) {
|
||||
const preferredKind = settingsStore.editorSettings.executeMode === "current" ? "cursor" : "all";
|
||||
const candidate = candidates.find((item) => item.kind === preferredKind) ?? candidates[0];
|
||||
emit("execute", candidate.sql);
|
||||
return true;
|
||||
}
|
||||
closePicker();
|
||||
pickerCandidates.value = candidates;
|
||||
pickerActiveIndex.value = 0;
|
||||
|
||||
Reference in new issue
Block a user