Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: fix https://github.com/siyuan-note/siyuan/issues/11087

Vanessa6521d4c53742
diff --git a/app/src/layout/dock/Graph.ts b/app/src/layout/dock/Graph.ts
index ee943f5c90..0a372c1d6f 100644
--- a/app/src/layout/dock/Graph.ts
+++ b/app/src/layout/dock/Graph.ts
@@ -319,7 +319,7 @@ export class Graph extends Model {
target.previousElementSibling.classList.remove("fn__none");
(target.previousElementSibling as HTMLInputElement).select();
} else if (dataType === "refresh") {
- this.searchGraph(false);
+ this.searchGraph(false, undefined, true);
} else if (dataType === "fullscreen") {
fullscreen(this.element, target);
}
@@ -406,7 +406,7 @@ export class Graph extends Model {
this.searchGraph(false);
}
- public searchGraph(focus: boolean, id?: string) {
+ public searchGraph(focus: boolean, id?: string, refresh = false) {
const element = this.element.querySelector('.block__icon[data-type="refresh"] svg');
if (element.classList.contains("fn__rotate") && !id) {
return;
@@ -465,7 +465,7 @@ export class Graph extends Model {
if (id) {
this.blockId = id;
}
- if (this.blockId && !isCurrentEditor(this.blockId) && this.type === "pin") {
+ if (!refresh && this.type === "pin" && this.blockId && !isCurrentEditor(this.blockId)) {
return;
}
this.graphData = response.data;