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

Vanessaac050a5e0358
diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts
index 7aa2c536a3..9fdbb45b85 100644
--- a/app/src/protyle/render/av/action.ts
+++ b/app/src/protyle/render/av/action.ts
@@ -229,6 +229,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
event.stopPropagation();
return true;
} else if (type === "av-group-fold") {
+ target.setAttribute("data-processed", "true");
const isOpen = target.firstElementChild.classList.contains("av__group-arrow--open");
if (isOpen) {
target.firstElementChild.classList.remove("av__group-arrow--open");
diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts
index 5702fdd4fc..2f1d522f40 100644
--- a/app/src/protyle/render/av/render.ts
+++ b/app/src/protyle/render/av/render.ts
@@ -784,6 +784,10 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
getAVElements(protyle, operation.avID).forEach((item) => {
const foldElement = item.querySelector(`[data-type="av-group-fold"][data-id="${operation.id}"]`);
if (foldElement) {
+ if (foldElement.getAttribute("data-processed") === "true") {
+ foldElement.removeAttribute("data-processed");
+ return;
+ }
if (operation.data) {
foldElement.firstElementChild.classList.remove("av__group-arrow--open");
foldElement.parentElement.nextElementSibling.classList.add("fn__none");