Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:sparkles: https://github.com/siyuan-note/siyuan/issues/4981

Vanessa436f439dd1f6
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index 672cbbc5b1..49f0869f0f 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -219,6 +219,26 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
}
});
}
+ submenu.push({
+ label: "原始块",
+ click() {
+ fetchPost("/api/block/swapBlockRef", {
+ refID: id,
+ defID: refBlockId,
+ includeChildren: false
+ })
+ }
+ });
+ submenu.push({
+ label: "原始块及子块",
+ click() {
+ fetchPost("/api/block/swapBlockRef", {
+ refID: id,
+ defID: refBlockId,
+ includeChildren: true
+ })
+ }
+ });
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.turnInto,
icon: "iconRefresh",