Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/10065

Vanessaa04f7107fdba
diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts
index bc660f6e37..183e698ca4 100644
--- a/app/src/card/openCard.ts
+++ b/app/src/card/openCard.ts
@@ -143,6 +143,9 @@ export const bindCardEvent = (options: {
dialog?: Dialog,
index?: number
}) => {
+ options.app.plugins.forEach(item => {
+ item.eventBus.emit("update-cards", options);
+ });
if (window.siyuan.storage[Constants.LOCAL_FLASHCARD].fullscreen) {
fullscreen(options.element.querySelector(".card__main"),
options.element.querySelector('[data-type="fullscreen"]'));
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index 58d35f6630..32bd53b99d 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -64,6 +64,7 @@ type TEventBus = "ws-main" | "sync-start" | "sync-end" | "sync-fail" |
"loaded-protyle" | "loaded-protyle-dynamic" | "loaded-protyle-static" |
"switch-protyle" |
"destroy-protyle" |
+ "update-cards"|
"lock-screen" |
"mobile-keyboard-show" | "mobile-keyboard-hide"
type TAVCol =