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

Vanessabf77d9487072
diff --git a/app/src/history/history.ts b/app/src/history/history.ts
index fc9bb4b965..fe26dafcdd 100644
--- a/app/src/history/history.ts
+++ b/app/src/history/history.ts
@@ -48,11 +48,16 @@ const renderDoc = (element: HTMLElement, currentPage: number) => {
if (window.siyuan.storage[Constants.LOCAL_HISTORY].type !== 2 && window.siyuan.storage[Constants.LOCAL_HISTORY].type !== 4) {
opElement.value = "all";
}
+ if (typeElement.value === "4") {
+ opElement.querySelector('option[value="update"]').classList.add("fn__none");
+ opElement.querySelector('option[value="sync"]').classList.add("fn__none");
+ } else {
+ opElement.querySelector('option[value="update"]').classList.remove("fn__none");
+ opElement.querySelector('option[value="sync"]').classList.remove("fn__none");
+ }
opElement.querySelector('option[value="clean"]').classList.remove("fn__none");
- opElement.querySelector('option[value="update"]').classList.remove("fn__none");
opElement.querySelector('option[value="delete"]').classList.add("fn__none");
opElement.querySelector('option[value="format"]').classList.add("fn__none");
- opElement.querySelector('option[value="sync"]').classList.remove("fn__none");
opElement.querySelector('option[value="replace"]').classList.add("fn__none");
opElement.querySelector('option[value="outline"]').classList.add("fn__none");
} else {
@@ -751,7 +756,9 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => {
content: `<div data-node-id="${Lute.NewNodeID()}" data-av-id="${target.querySelector(".b3-list-item__text").textContent}" data-type="NodeAttributeView" data-av-type="table"><div spellcheck="true"></div><div class="protyle-attr" contenteditable="false">${Constants.ZWSP}</div></div>`,
id: Lute.NewNodeID(),
rootID: Lute.NewNodeID(),
- }
+ },
+ msg: "",
+ code: 0
},
protyle: historyEditor.protyle,
action: [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML],