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: fix https://github.com/siyuan-note/siyuan/issues/6189
Vanessaff64e5fcef38
diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yamlindex 48b048793e..ad72dac10f 100644--- a/app/pnpm-lock.yaml+++ b/app/pnpm-lock.yaml@@ -1906,10 +1906,10 @@ packages:resolution: {integrity: sha512-m0+M53+HYMzqKxwNQZT143K7WwXEGUy9LY31l8dJphXx2P/FQod615mVbxHyqbDCG4J5bHdWm21qZ0e2DVY6CQ==}engines: {node: '>=14.0.0'}dependencies:- 7zip-bin: 5.1.1'@develar/schema-utils': 2.6.5'@electron/universal': 1.2.1'@malept/flatpak-bundler': 0.4.0+ 7zip-bin: 5.1.1async-exit-hook: 2.0.1bluebird-lst: 1.0.9builder-util: 23.3.3@@ -2193,9 +2193,9 @@ packages:/builder-util/23.3.3:resolution: {integrity: sha512-MJZlUiq2PY5hjYv9+XNaoYdsITqvLgRDoHSFg/4nzpInbNxNjLQOolL04Zsyp+hgfcbFvMC4h0KkR1CMPHLWbA==}dependencies:- 7zip-bin: 5.1.1'@types/debug': 4.1.7'@types/fs-extra': 9.0.13+ 7zip-bin: 5.1.1app-builder-bin: 4.0.0bluebird-lst: 1.0.9builder-util-runtime: 9.0.3diff --git a/app/src/editor/util.ts b/app/src/editor/util.tsindex cbf9e0c352..bf5da86159 100644--- a/app/src/editor/util.ts+++ b/app/src/editor/util.ts@@ -335,15 +335,11 @@ export const updatePanelByEditor = (protyle?: IProtyle, focus = true, pushBackStfileModel.selectItem(protyle.notebookId, protyle.path);}}- const models = getAllModels();- updateOutline(models, protyle, reload);- updateBacklinkGraph(models, protyle);- } else {- // 关闭所有页签时,需更新对应的面板- const models = getAllModels();- updateOutline(models, protyle, reload);- updateBacklinkGraph(models, protyle);}+ // 切换页签或关闭所有页签时,需更新对应的面板+ const models = getAllModels();+ updateOutline(models, protyle, reload);+ updateBacklinkGraph(models, protyle);setTitle(title);};@@ -373,7 +369,7 @@ const updateOutline = (models: IModels, protyle: IProtyle, reload = false) => {fetchPost("/api/outline/getDocOutline", {id: blockId,}, response => {- if (!isCurrentEditor(blockId)) {+ if (!isCurrentEditor(blockId) || item.blockId === blockId) {return;}item.update(response, blockId);@@ -447,7 +443,7 @@ export const updateBacklinkGraph = (models: IModels, protyle: IProtyle) => {k: item.inputsElement[0].value,mk: item.inputsElement[1].value,}, response => {- if (!isCurrentEditor(blockId)) {+ if (!isCurrentEditor(blockId) || item.blockId === blockId) {item.element.querySelector('.block__icon[data-type="refresh"] svg').classList.remove("fn__rotate");return;}diff --git a/app/src/layout/dock/Backlink.ts b/app/src/layout/dock/Backlink.tsindex 288c036f8f..12df8e5993 100644--- a/app/src/layout/dock/Backlink.ts+++ b/app/src/layout/dock/Backlink.ts@@ -369,6 +369,10 @@ export class Backlink extends Model {private toggleItem(liElement: HTMLElement, isMention: boolean) {const svgElement = liElement.firstElementChild.firstElementChild;+ if (svgElement.getAttribute("disabled")) {+ return;+ }+ svgElement.setAttribute("disabled", "disabled");const docId = liElement.getAttribute("data-node-id");if (svgElement.classList.contains("b3-list-item__arrow--open")) {svgElement.classList.remove("b3-list-item__arrow--open");@@ -380,12 +384,14 @@ export class Backlink extends Model {}});liElement.nextElementSibling?.remove();+ svgElement.removeAttribute("disabled");} else {- svgElement.classList.add("b3-list-item__arrow--open");fetchPost(isMention ? "/api/ref/getBackmentionDoc" : "/api/ref/getBacklinkDoc", {defID: this.blockId,refTreeID: docId}, (response) => {+ svgElement.removeAttribute("disabled");+ svgElement.classList.add("b3-list-item__arrow--open");const editorElement = document.createElement("div");editorElement.style.minHeight = "auto";editorElement.setAttribute("data-defid", this.blockId);