An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Add plugin event bus `open-menu-inbox` (#9967)
Yingyi / 颖逸a47e477d8654
diff --git a/app/src/layout/dock/Inbox.ts b/app/src/layout/dock/Inbox.tsindex 03a602884d..646035a134 100644--- a/app/src/layout/dock/Inbox.ts+++ b/app/src/layout/dock/Inbox.ts@@ -15,6 +15,7 @@ import {App} from "../../index";import {getCloudURL} from "../../config/util/about";import {hasClosestByClassName} from "../../protyle/util/hasClosest";import {escapeHtml} from "../../util/escape";+import {emitOpenMenu} from "../../plugin/EventBus";export class Inbox extends Model {private element: Element;@@ -294,6 +295,17 @@ ${data.shorthandContent}}}).element);}+ if (this.app.plugins) {+ emitOpenMenu({+ plugins: this.app.plugins,+ type: "open-menu-inbox",+ detail: {+ ids,+ element: itemElement || detailsElement,+ },+ separatorPosition: "top",+ });+ }window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY + 16});}diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.tsindex a2d877155a..c44977adc6 100644--- a/app/src/types/index.d.ts+++ b/app/src/types/index.d.ts@@ -56,7 +56,7 @@ type TEventBus = "ws-main" | "sync-start" | "sync-end" | "sync-fail" |"click-blockicon" | "click-editorcontent" | "click-pdf" | "click-editortitleicon" |"open-noneditableblock" |"open-menu-blockref" | "open-menu-fileannotationref" | "open-menu-tag" | "open-menu-link" | "open-menu-image" |- "open-menu-av" | "open-menu-content" | "open-menu-breadcrumbmore" | "open-menu-doctree" |+ "open-menu-av" | "open-menu-content" | "open-menu-breadcrumbmore" | "open-menu-doctree" | "open-menu-inbox" |"open-siyuan-url-plugin" | "open-siyuan-url-block" |"paste" |"input-search" |