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/9522
Vanessa8f15b0f4acc8
diff --git a/app/src/util/newFile.ts b/app/src/util/newFile.tsindex 72c4a43da9..072c83498c 100644--- a/app/src/util/newFile.ts+++ b/app/src/util/newFile.ts@@ -52,13 +52,18 @@ export const getNewFilePath = (useSavePath: boolean) => {}/// #endifif (!notebookId) {- window.siyuan.notebooks.find(item => {- if (!item.closed) {- notebookId = item.id;- currentPath = "/";- return true;- }- });+ if (window.siyuan.mobile.editor) {+ notebookId = window.siyuan.mobile.editor.protyle.notebookId;+ }+ if (!notebookId) {+ window.siyuan.notebooks.find(item => {+ if (!item.closed) {+ notebookId = item.id;+ currentPath = "/";+ return true;+ }+ });+ }}return {notebookId, currentPath};};