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

Vanessa01940692c417
diff --git a/app/src/util/newFile.ts b/app/src/util/newFile.ts
index 6020150c30..87b12e4de3 100644
--- a/app/src/util/newFile.ts
+++ b/app/src/util/newFile.ts
@@ -68,7 +68,7 @@ export const newFile = (notebookId?: string, currentPath?: string, paths?: strin
} else {
fetchPost("/api/filetree/getHPathByPath", {
notebook: notebookId,
- path: currentPath
+ path: currentPath.endsWith(".sy") ? currentPath : currentPath + ".sy"
}, (responseHPath) => {
fetchPost("/api/filetree/createDocWithMd", {
notebook: notebookId,