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:
Vanessaa683464b753b
diff --git a/app/src/editor/rename.ts b/app/src/editor/rename.tsindex 19dad2cd85..366f1abc7a 100644--- a/app/src/editor/rename.ts+++ b/app/src/editor/rename.ts@@ -8,7 +8,10 @@ import {getAssetName, getDisplayName, pathPosix, setNotebookName} from "../util/import {fetchPost} from "../util/fetch";import {Constants} from "../constants";import {showTooltip} from "../dialog/tooltip";+/// #if !MOBILEimport {getAllEditor, getAllModels} from "../layout/getAll";+import {getCurrentEditor} from "../mobile/editor";+/// #endifexport const validateName = (name: string, targetElement?: HTMLElement) => {if (/\r\n|\r|\n|\u2028|\u2029|\t|\//.test(name)) {@@ -135,6 +138,9 @@ export const renameAsset = (assetPath: string) => {}fetchPost("/api/asset/renameAsset", {oldPath: assetPath, newName: inputElement.value}, (response) => {+ /// #if MOBILE+ getCurrentEditor()?.reload(false);+ /// #elsegetAllModels().asset.forEach(item => {if (item.path === assetPath) {item.path = response.data.newPath;@@ -144,6 +150,7 @@ export const renameAsset = (assetPath: string) => {getAllEditor().forEach(item => {item.reload(false);});+ /// #endifdialog.destroy();});});