From 90a18a7b23ea7559ef5f4aa5e31adee2fa8f3a29 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Thu, 20 Aug 2026 14:26:56 +0000 Subject: [PATCH] fix(editor): refresh context actions on first right-click Closes #6811 --- .../src/components/editor/QueryEditor.vue | 6 +- .../__tests__/QueryEditorContextMenu.spec.ts | 100 ++++++++++++++++++ 2 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 apps/desktop/src/components/editor/__tests__/QueryEditorContextMenu.spec.ts diff --git a/apps/desktop/src/components/editor/QueryEditor.vue b/apps/desktop/src/components/editor/QueryEditor.vue index b73f86c248..30acdb36a8 100644 --- a/apps/desktop/src/components/editor/QueryEditor.vue +++ b/apps/desktop/src/components/editor/QueryEditor.vue @@ -1853,6 +1853,10 @@ const contextMenuItems = computed(() => { ]; }); +function currentContextMenuItems(): ContextMenuItem[] { + return contextMenuItems.value; +} + function handleSqlIntentionActions(currentView: EditorViewType): boolean { if (props.readOnly) return false; try { @@ -5838,7 +5842,7 @@ defineExpose({