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

Vanessa258e5627267e
diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts
index 49ca96a6fa..e10c05e6fa 100644
--- a/app/src/layout/dock/Outline.ts
+++ b/app/src/layout/dock/Outline.ts
@@ -332,7 +332,9 @@ export class Outline extends Model {
preview: this.isPreview
}, response => {
this.update(response);
- this.updateDocTitle((options.tab.model as Editor)?.editor?.protyle?.background?.ial, response.data?.length || 0);
+ if (this.blockId) {
+ this.updateDocTitle((options.tab.model as Editor)?.editor?.protyle?.background?.ial, response.data?.length || 0);
+ }
});
}
diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts
index db7038c722..b363bc610c 100644
--- a/app/src/layout/dock/index.ts
+++ b/app/src/layout/dock/index.ts
@@ -613,6 +613,9 @@ export class Dock {
blockId: editor?.protyle?.block?.rootID,
isPreview: editor?.protyle?.preview ? !editor.protyle.preview.element.classList.contains("fn__none") : false
});
+ if (editor?.protyle?.block?.rootID) {
+ outline.updateDocTitle(editor?.protyle?.background?.ial);
+ }
tab.addModel(outline);
}
});