An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: fix https://github.com/siyuan-note/siyuan/issues/5297
Vanessa59bff8376a48
diff --git a/app/src/editor/index.ts b/app/src/editor/index.tsindex 7b9a7ae7b8..a96d7c9878 100644--- a/app/src/editor/index.ts+++ b/app/src/editor/index.ts@@ -46,7 +46,6 @@ export class Editor extends Model {},typewriterMode: true,after: (editor) => {- editor.protyle.model = this;if (window.siyuan.config.readonly) {disabledProtyle(editor.protyle);}@@ -63,5 +62,6 @@ export class Editor extends Model {}},});+ this.editor.protyle.model = this;}}diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.tsindex b3ca26b36e..18ff202784 100644--- a/app/src/protyle/index.ts+++ b/app/src/protyle/index.ts@@ -104,8 +104,13 @@ class Protyle {}break;case "rename":- if (this.protyle.path === data.data.path && this.protyle.model) {- this.protyle.model.parent.updateTitle(data.data.title);+ if (this.protyle.path === data.data.path) {+ if (this.protyle.model) {+ this.protyle.model.parent.updateTitle(data.data.title);+ }+ if (this.protyle.background) {+ this.protyle.background.ial.title = data.data.title+ }}if (this.protyle.options.render.title && this.protyle.block.parentID === data.data.id) {if (getSelection().rangeCount > 0 && this.protyle.element.contains(getSelection().getRangeAt(0).startContainer)) {diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.tsindex 1fc72bb10f..f9e1cd2569 100644--- a/app/src/protyle/util/onGet.ts+++ b/app/src/protyle/util/onGet.ts@@ -206,7 +206,7 @@ const setHTML = (options: { content: string, action?: string[] }, protyle: IProtif (!protyle.scroll.element.classList.contains("fn__none") &&protyle.wysiwyg.element.lastElementChild.getAttribute("data-eof") !== "true" &&protyle.contentElement.scrollHeight > 0 && // 没有激活的页签 https://github.com/siyuan-note/siyuan/issues/5255- !options.action.includes(Constants.CB_GET_FOCUSFIRST) &&+ !options.action.includes(Constants.CB_GET_FOCUSFIRST) && // 防止 eof 为true https://github.com/siyuan-note/siyuan/issues/5291protyle.contentElement.scrollHeight <= protyle.contentElement.clientHeight) {fetchPost("/api/filetree/getDoc", {id: protyle.wysiwyg.element.lastElementChild.getAttribute("data-node-id"),