An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: Skip reference warning when deleting the user guide https://github.com/siyuan-note/siyuan/issues/18507
Danielc23845112ec2
diff --git a/app/src/editor/deleteFile.ts b/app/src/editor/deleteFile.tsindex 2ec4d515e9..f9ae0e8267 100644--- a/app/src/editor/deleteFile.ts+++ b/app/src/editor/deleteFile.ts@@ -61,6 +61,12 @@ export const deleteFiles = async (liElements: Element[]) => {deleteFile(itemNotebookId, liElements[0].getAttribute("data-path"));} else {const isHelpNotebook = Object.values(Constants.HELP_PATH).includes(itemNotebookId);+ if (isHelpNotebook) {+ fetchPost("/api/notebook/removeNotebook", {+ notebook: itemNotebookId,+ });+ return;+ }const hasRef = await checkBlockRef({scope: "notebook",notebook: itemNotebookId,@@ -68,13 +74,13 @@ export const deleteFiles = async (liElements: Element[]) => {if (hasRef === undefined) {return;}- let tip = isHelpNotebook ? "" : `${window.siyuan.languages.confirmDeleteTip.replace("${x}", Lute.EscapeHTMLStr(getNotebookName(itemNotebookId)))}+ let tip = `${window.siyuan.languages.confirmDeleteTip.replace("${x}", Lute.EscapeHTMLStr(getNotebookName(itemNotebookId)))}<div class="fn__hr"></div><div class="ft__smaller ft__on-surface">${window.siyuan.languages.rollbackTip.replace("${x}", window.siyuan.config.editor.historyRetentionDays)}</div>`;if (hasRef) {tip += getBlockRefWarningHTML();}- confirmDialog(isHelpNotebook ? "" : window.siyuan.languages.deleteOpConfirm,+ confirmDialog(window.siyuan.languages.deleteOpConfirm,tip, () => {fetchPost("/api/notebook/removeNotebook", {notebook: itemNotebookId,