fix(plugins): show plugin context-menu entries in connection sidebar

This commit is contained in:
ccyylhj authored and GitHub committed 2026-09-17 11:40:22 +08:00
1 parent e2ae5d29a1
commit 48d0ebc90e
1 file changed
+5 -2
@@ -5598,6 +5598,11 @@ function buildConnectionSidebarMenu(context: SidebarMenuFactoryContext): boolean
shortcut: shortcutDelete,
variant: "destructive" as const,
});
// Plugin-contributed entries must be appended before this branch returns.
// treeItemMenuItems() stops at the first factory that reports the node as
// handled, so a call placed after the factory loop never runs for a
// connection node.
appendPluginConnectionMenuItems(items, node);
return true;
}
@@ -6481,8 +6486,6 @@ function treeItemMenuItems(): ContextMenuItem[] {
items.push({ label: t("contextMenu.copyName"), action: copyName, icon: Copy, shortcut: shortcutCopyName.value });
}
appendPluginConnectionMenuItems(items, node);
return items;
}