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

Liang Ding2982ac75ddcb
diff --git a/app/src/util/newFile.ts b/app/src/util/newFile.ts
index 58746ff09b..bf6f2640b7 100644
--- a/app/src/util/newFile.ts
+++ b/app/src/util/newFile.ts
@@ -53,13 +53,13 @@ export const newFile = (notebookId?: string, currentPath?: string, open?: boolea
}
});
}
- fetchPost("/api/filetree/getDocNameTemplate", {notebook: notebookId}, (data) => {
+ fetchPost("/api/filetree/getDocCreateSavePath", {notebook: notebookId}, (data) => {
const id = Lute.NewNodeID();
const newPath = pathPosix().join(getDisplayName(currentPath, false, true), id + ".sy");
if (paths) {
paths[paths.indexOf(undefined)] = newPath;
}
- if (!validateName(data.data.name)) {
+ if (!validateName(data.data.path)) {
return;
}
fetchPost("/api/filetree/createDoc", {