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: Improve dynamic anchor text and ref count auto-refresh stability https://github.com/siyuan-note/siyuan/issues/8234
Danielf88296c4d255
diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.tsindex 58d94d95ef..b02d5189b2 100644--- a/app/src/dialog/processSystem.ts+++ b/app/src/dialog/processSystem.ts@@ -2,11 +2,10 @@ import {Constants} from "../constants";import {fetchPost} from "../util/fetch";/// #if !MOBILEimport {exportLayout} from "../layout/util";-import {getAllModels} from "../layout/getAll";+/// #endif+import {getAllEditor, getAllModels} from "../layout/getAll";import {getDockByType} from "../layout/tabUtil";import {Files} from "../layout/dock/Files";-/// #endif-import {getAllEditor} from "../layout/getAll";/// #if !BROWSERimport {ipcRenderer} from "electron";/// #endif@@ -166,25 +165,21 @@ export const setDefRefCount = (data: {"refCount": number,"rootRefCount": number,"rootID": string- refIds: string[]+ refIDs: string[]}) => {getAllEditor().forEach(item => {if (data.rootID === data.blockID && item.protyle.block.rootID === data.rootID) {const attrElement = item.protyle.title.element.querySelector(".protyle-attr")const countElement = attrElement.querySelector('.popover__block')- // TODO- data.refIds = ["1", "2"]if (countElement) {if (data.refCount === 0) {countElement.remove()} else {countElement.textContent = data.refCount.toString();- // TODO- countElement.setAttribute("data-id", data.refIds.toString())+ countElement.setAttribute("data-id", data.refIDs.toString())}} else if (data.refCount > 0) {- // TODO- attrElement.insertAdjacentHTML("beforeend", `<div class="protyle-attr--refcount popover__block" data-defids="["${data.blockID}"]" data-id="${data.refIds.toString()}" style="">${data.refCount}</div>`)+ attrElement.insertAdjacentHTML("beforeend", `<div class="protyle-attr--refcount popover__block" data-defids="["${data.blockID}"]" data-id="${data.refIDs.toString()}" style="">${data.refCount}</div>`)}return;}