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/8216

Vanessa3edd8230d33e
diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts
index b18eee06ef..8563299f2c 100644
--- a/app/src/protyle/index.ts
+++ b/app/src/protyle/index.ts
@@ -2,7 +2,7 @@ import {Constants} from "../constants";
import {Hint} from "./hint";
import {setLute} from "./markdown/setLute";
import {Preview} from "./preview";
-import {initUI, removeLoading, setPadding} from "./ui/initUI";
+import {addLoading, initUI, removeLoading, setPadding} from "./ui/initUI";
import {Undo} from "./undo";
import {Upload} from "./upload";
import {Options} from "./util/Options";
@@ -89,6 +89,16 @@ export class Protyle {
type: "protyle",
msgCallback: (data) => {
switch (data.cmd) {
+ case "reload":
+ if (data.data === this.protyle.block.rootID) {
+ reloadProtyle(this.protyle, false);
+ }
+ break;
+ case "addLoadding":
+ if (data.data === this.protyle.block.rootID) {
+ addLoading(this.protyle);
+ }
+ break;
case "transactions":
data.data[0].doOperations.forEach((item: IOperation) => {
onTransaction(this.protyle, item, false);