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: https://github.com/siyuan-note/siyuan/issues/7976
Danielf95d268f0006
diff --git a/app/appearance/icons/index.html b/app/appearance/icons/index.htmlindex cf75962c28..de30afa813 100644--- a/app/appearance/icons/index.html+++ b/app/appearance/icons/index.html@@ -28,6 +28,30 @@<body><h2>SiYuan</h2><div class="fn__clear">+ <div>+ <svg>+ <use xlink:href="#iconWidth"></use>+ </svg>+ iconWidth+ </div>+ <div>+ <svg>+ <use xlink:href="#iconAlignSettings"></use>+ </svg>+ iconAlignSettings+ </div>+ <div>+ <svg>+ <use xlink:href="#iconFoldUnFold"></use>+ </svg>+ iconFoldUnFold+ </div>+ <div>+ <svg>+ <use xlink:href="#iconJumpTo"></use>+ </svg>+ iconJumpTo+ </div><div><svg><use xlink:href="#iconEnterBack"></use>@@ -1150,6 +1174,12 @@</svg>iconAlignCenter</div>+ <div>+ <svg>+ <use xlink:href="#iconAlignJustify"></use>+ </svg>+ iconAlignJustify+ </div><div><svg><use xlink:href="#iconAlignLeft"></use>diff --git a/app/appearance/icons/material/icon.js b/app/appearance/icons/material/icon.jsindex f6e1e2806e..20c7194ba5 100644--- a/app/appearance/icons/material/icon.js+++ b/app/appearance/icons/material/icon.js@@ -1,5 +1,17 @@document.body.insertAdjacentHTML('afterbegin', `<svg id="iconsMaterial" style="position: absolute; width: 0; height: 0; overflow: hidden;"><defs>+ <symbol id="iconWidth" viewBox="30 -930 900 900">+ <path d="M140-172.31v-615.38q0-13.54 9.39-22.92 9.38-9.39 22.92-9.39 13.54 0 22.92 9.39 9.39 9.38 9.39 22.92v615.38q0 13.54-9.39 22.92-9.38 9.39-22.92 9.39-13.54 0-22.92-9.39-9.39-9.38-9.39-22.92Zm615.38 0v-615.38q0-13.54 9.39-22.92 9.38-9.39 22.92-9.39 13.54 0 22.92 9.39 9.39 9.38 9.39 22.92v615.38q0 13.54-9.39 22.92-9.38 9.39-22.92 9.39-13.54 0-22.92-9.39-9.39-9.38-9.39-22.92Zm-298.3-284.77q-9.39-9.38-9.39-22.92 0-13.54 9.39-22.92 9.38-9.39 22.92-9.39 13.54 0 22.92 9.39 9.39 9.38 9.39 22.92 0 13.54-9.39 22.92-9.38 9.39-22.92 9.39-13.54 0-22.92-9.39Zm-153.85 0q-9.38-9.38-9.38-22.92 0-13.54 9.38-22.92 9.39-9.39 22.92-9.39 13.54 0 22.93 9.39 9.38 9.38 9.38 22.92 0 13.54-9.38 22.92-9.39 9.39-22.93 9.39-13.53 0-22.92-9.39Zm307.69 0q-9.38-9.38-9.38-22.92 0-13.54 9.38-22.92 9.39-9.39 22.93-9.39 13.53 0 22.92 9.39 9.38 9.38 9.38 22.92 0 13.54-9.38 22.92-9.39 9.39-22.92 9.39-13.54 0-22.93-9.39Z"/>+ </symbol>+ <symbol id="iconAlignSettings" viewBox="30 -930 900 900">+ <path d="M145.39-100q-12.77 0-21.39-8.62-8.61-8.61-8.61-21.38v-700q0-12.77 8.61-21.38 8.62-8.62 21.39-8.62 12.77 0 21.38 8.62 8.62 8.61 8.62 21.38v700q0 12.77-8.62 21.38-8.61 8.62-21.38 8.62Zm171.92-193.85q-20.77 0-35.58-14.8-14.8-14.81-14.8-35.58 0-20.77 14.8-35.58 14.81-14.8 35.58-14.8h236.92q20.77 0 35.58 14.8 14.8 14.81 14.8 35.58 0 20.77-14.8 35.58-14.81 14.8-35.58 14.8H317.31Zm0-271.54q-20.77 0-35.58-14.8-14.8-14.81-14.8-35.58 0-20.77 14.8-35.58 14.81-14.8 35.58-14.8h476.92q20.77 0 35.58 14.8 14.8 14.81 14.8 35.58 0 20.77-14.8 35.58-14.81 14.8-35.58 14.8H317.31Z"/>+ </symbol>+ <symbol id="iconFoldUnFold" viewBox="30 -930 900 900">+ <path d="M280-280h130q12.75 0 21.38 8.63 8.62 8.63 8.62 21.38 0 12.76-8.62 21.37Q422.75-220 410-220H256.16q-15.37 0-25.76-10.4-10.4-10.39-10.4-25.76V-410q0-12.75 8.63-21.38 8.63-8.62 21.38-8.62 12.76 0 21.37 8.62Q280-422.75 280-410v130Zm400-400H550q-12.75 0-21.38-8.63-8.62-8.63-8.62-21.38 0-12.76 8.62-21.37Q537.25-740 550-740h153.84q15.37 0 25.76 10.4 10.4 10.39 10.4 25.76V-550q0 12.75-8.63 21.38-8.63 8.62-21.38 8.62-12.76 0-21.37-8.62Q680-537.25 680-550v-130Z"/>+ </symbol>+ <symbol id="iconJumpTo" viewBox="30 -930 900 900">+ <path d="M508.46-508.46h50q12.75 0 21.38 8.63 8.62 8.63 8.62 21.38 0 12.76-8.62 21.37-8.63 8.62-21.38 8.62h-73.65q-15.66 0-26-10.4-10.35-10.39-10.35-25.76v-73.84q0-12.75 8.63-21.38 8.63-8.62 21.38-8.62 12.76 0 21.38 8.62 8.61 8.63 8.61 21.38v50Zm291.54 0v-50q0-12.75 8.63-21.38 8.63-8.62 21.38-8.62 12.76 0 21.37 8.62 8.62 8.63 8.62 21.38v73.65q0 15.66-10.4 26-10.39 10.35-25.76 10.35H750q-12.75 0-21.38-8.63-8.62-8.63-8.62-21.38 0-12.76 8.62-21.38 8.63-8.61 21.38-8.61h50ZM508.46-800v50q0 12.75-8.63 21.38-8.63 8.62-21.38 8.62-12.76 0-21.37-8.62-8.62-8.63-8.62-21.38v-73.65q0-15.66 10.4-26Q469.25-860 484.62-860h73.84q12.75 0 21.38 8.63 8.62 8.63 8.62 21.38 0 12.76-8.62 21.37-8.63 8.62-21.38 8.62h-50ZM800-800h-50q-12.75 0-21.38-8.63-8.62-8.63-8.62-21.38 0-12.76 8.62-21.37Q737.25-860 750-860h73.65q15.66 0 26 10.4Q860-839.21 860-823.84V-750q0 12.75-8.63 21.38-8.63 8.62-21.38 8.62-12.76 0-21.37-8.62Q800-737.25 800-750v-50ZM388.46-346.31 163.23-121.08q-8.31 8.31-20.88 8.5-12.58.19-21.27-8.5t-8.69-21.07q0-12.39 8.69-21.08l225.23-225.23H170q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.39 0-12.75 8.63-21.37 8.62-8.61 21.37-8.61h242.31q15.36 0 25.76 10.39 10.39 10.4 10.39 25.76V-170q0 12.75-8.63 21.37-8.63 8.63-21.38 8.63-12.76 0-21.37-8.63-8.62-8.62-8.62-21.37v-176.31Z"/>+ </symbol><symbol id="iconEnterBack" viewBox="30 -930 900 900"><path d="M450-514.54v152.23q0 12.75 8.63 21.38 8.63 8.62 21.38 8.62 12.76 0 21.57-8.73 8.8-8.74 8.8-21.65v-151.85l53.31 53.31q8.31 8.31 20.89 8.11 12.57-.19 20.88-8.5 8.31-8.3 8.31-20.94t-8.31-20.82l-99.77-99.39q-10.84-10.84-25.31-10.84-14.46 0-25.3 10.84L355.31-503q-8.31 8.31-8.31 20.69 0 12.39 8.31 20.69 8.31 8.31 20.95 8.31 12.64 0 20.82-8.31L450-514.54ZM480.07-100q-78.84 0-148.21-29.92t-120.68-81.21q-51.31-51.29-81.25-120.63Q100-401.1 100-479.93q0-78.84 29.92-148.21t81.21-120.68q51.29-51.31 120.63-81.25Q401.1-860 479.93-860q78.84 0 148.21 29.92t120.68 81.21q51.31 51.29 81.25 120.63Q860-558.9 860-480.07q0 78.84-29.92 148.21t-81.21 120.68q-51.29 51.31-120.63 81.25Q558.9-100 480.07-100Zm-.07-60q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></symbol>@@ -591,6 +603,9 @@ document.body.insertAdjacentHTML('afterbegin', `<svg id="iconsMaterial" style="p</symbol><symbol id="iconAlignCenter" viewBox="30 -930 900 900"><path d="M170-140q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-200 170-200h620q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q802.75-140 790-140H170Zm160-155q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q317.25-355 330-355h300q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q642.75-295 630-295H330ZM170-450q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-510 170-510h620q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q802.75-450 790-450H170Zm160-155q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q317.25-665 330-665h300q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q642.75-605 630-605H330ZM170-760q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-820 170-820h620q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q802.75-760 790-760H170Z"/>+ </symbol>+ <symbol id="iconAlignJustify" viewBox="30 -930 900 900">+ <path d="M170-140q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-200 170-200h620q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q802.75-140 790-140H170Zm0-155q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-355 170-355h620q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q802.75-295 790-295H170Zm0-155q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-510 170-510h620q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q802.75-450 790-450H170Zm0-155q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-665 170-665h620q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q802.75-605 790-605H170Zm0-155q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-820 170-820h620q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q802.75-760 790-760H170Z"/></symbol><symbol id="iconAlignLeft" viewBox="30 -930 900 900"><path d="M170-140q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-200 170-200h620q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q802.75-140 790-140H170Zm0-155q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-355 170-355h380q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q562.75-295 550-295H170Zm0-155q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-510 170-510h620q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q802.75-450 790-450H170Zm0-155q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-665 170-665h380q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q562.75-605 550-605H170Zm0-155q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37Q157.25-820 170-820h620q12.75 0 21.37 8.63 8.63 8.63 8.63 21.38 0 12.76-8.63 21.37Q802.75-760 790-760H170Z"/>diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.tsindex a8f4d4e68e..26ce5d3297 100644--- a/app/src/protyle/gutter/index.ts+++ b/app/src/protyle/gutter/index.ts@@ -1948,6 +1948,7 @@ export class Gutter {/// #if !MOBILEwindow.siyuan.menus.menu.append(new MenuItem({id: "enter",+ icon: "iconEnter",accelerator: `${updateHotkeyTip(window.siyuan.config.keymap.general.enter.custom)}/${updateHotkeyTip("⌘" + window.siyuan.languages.click)}`,label: window.siyuan.languages.openBy,click: () => {@@ -1993,6 +1994,7 @@ export class Gutter {}window.siyuan.menus.menu.append(new MenuItem({id: "jumpTo",+ icon: "iconJumpTo",type: "submenu",label: window.siyuan.languages.jumpTo,submenu: [{@@ -2030,6 +2032,7 @@ export class Gutter {if (type !== "NodeThematicBreak") {window.siyuan.menus.menu.append(new MenuItem({id: "fold",+ icon: "iconFoldUnFold",label: window.siyuan.languages.fold,accelerator: `${updateHotkeyTip(window.siyuan.config.keymap.editor.general.collapse.custom)}/${updateHotkeyTip("⌥" + window.siyuan.languages.click)}`,click() {@@ -2181,6 +2184,7 @@ export class Gutter {const disabledRTL = nodeElements.some(e => ["NodeAttributeView", "NodeCodeBlock", "NodeMathBlock"].includes(e.getAttribute("data-type")));window.siyuan.menus.menu.append(new MenuItem({id: "layout",+ icon: "iconAlignSettings",label: window.siyuan.languages.layout,type: "submenu",submenu: [{@@ -2233,7 +2237,7 @@ export class Gutter {}}, {id: "justify",- icon: "iconMenu",+ icon: "iconAlignJustify",label: window.siyuan.languages.justify,click: () => {this.genClick(nodeElements, protyle, (e: HTMLElement) => {@@ -2379,6 +2383,7 @@ export class Gutter {const width = firstElement.style.width.endsWith("%") ? parseInt(firstElement.style.width) : 0;window.siyuan.menus.menu.append(new MenuItem({id: "width",+ icon: "iconWidth",label: window.siyuan.languages.width,submenu: styles.concat([{id: "widthDrag",diff --git a/app/src/protyle/header/openTitleMenu.ts b/app/src/protyle/header/openTitleMenu.tsindex e9aff00447..5e057517ff 100644--- a/app/src/protyle/header/openTitleMenu.ts+++ b/app/src/protyle/header/openTitleMenu.ts@@ -103,7 +103,7 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition, from: striwindow.siyuan.menus.menu.append(new MenuItem({id: "separator_1", type: "separator"}).element);window.siyuan.menus.menu.append(new MenuItem({id: "outline",- icon: "iconAlignCenter",+ icon: "iconOutline",label: window.siyuan.languages.outline,accelerator: window.siyuan.config.keymap.editor.general.outline.custom,click: () => {