An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:rotating_light:
Vanessa8c639f8a165a
diff --git a/app/src/menus/commonMenuItem.ts b/app/src/menus/commonMenuItem.tsindex 8573eb9f71..9b3ee8d4cd 100644--- a/app/src/menus/commonMenuItem.ts+++ b/app/src/menus/commonMenuItem.ts@@ -1,7 +1,6 @@/// #if !BROWSERimport {shell} from "electron";/// #endif-import {newFile} from "../util/newFile";import {getDockByType} from "../layout/util";import {confirmDialog} from "../dialog/confirmDialog";import {getSearch, isMobile} from "../util/functions";diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.tsindex 15eb4f527d..df6ea4e0ab 100644--- a/app/src/menus/navigation.ts+++ b/app/src/menus/navigation.ts@@ -127,9 +127,9 @@ export const initNavigationMenu = (liElement: HTMLElement) => {return window.siyuan.menus.menu;};-export const initFileMenu = (notebookId: string, pathString: string, liElement: HTMLElement) => {- const id = liElement.getAttribute("data-node-id")- let name = liElement.getAttribute("data-name")+export const initFileMenu = (notebookId: string, pathString: string, liElement: Element) => {+ const id = liElement.getAttribute("data-node-id");+ let name = liElement.getAttribute("data-name");window.siyuan.menus.menu.remove();name = getDisplayName(name, false, true);if (!window.siyuan.config.readonly) {@@ -149,7 +149,7 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement:Array.from(liElement.parentElement.children).forEach((item) => {if (item.tagName === "LI") {if (item.isSameNode(liElement)) {- paths.push(undefined)+ paths.push(undefined);}paths.push(item.getAttribute("data-path"));}diff --git a/app/src/util/newFile.ts b/app/src/util/newFile.tsindex 348f4be147..8330bb59bf 100644--- a/app/src/util/newFile.ts+++ b/app/src/util/newFile.ts@@ -54,9 +54,9 @@ export const newFile = (notebookId?: string, currentPath?: string, open?: boolea}fetchPost("/api/filetree/getDocNameTemplate", {notebook: notebookId}, (data) => {const id = Lute.NewNodeID();- const newPath = pathPosix().join(getDisplayName(currentPath, false, true), id + ".sy")+ const newPath = pathPosix().join(getDisplayName(currentPath, false, true), id + ".sy");if (paths) {- paths[paths.indexOf(undefined)] = newPath+ paths[paths.indexOf(undefined)] = newPath;}fetchPost("/api/filetree/createDoc", {notebook: notebookId,