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: 点击其余地方需关闭字体面板
Vanessabc75e7491d5d
diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yamlindex c0a300e15e..9382c6bdab 100644--- a/app/pnpm-lock.yaml+++ b/app/pnpm-lock.yaml@@ -10,7 +10,7 @@ importers:dependencies:'@electron/remote':specifier: ^2.1.2- version: 2.1.2([email protected])+ version: 2.1.2([email protected])devDependencies:'@eslint/eslintrc':specifier: ^3.3.1@@ -40,8 +40,8 @@ importers:specifier: ^1.11.5version: 1.11.13electron:- specifier: 35.3.0- version: 35.3.0+ specifier: 35.2.2+ version: 35.2.2electron-builder:specifier: 26.0.12version: 26.0.12([email protected])@@ -451,42 +451,36 @@ packages:engines: {node: '>= 10.0.0'}cpu: [arm]os: [linux]- libc: [glibc]'@parcel/[email protected]':resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==}engines: {node: '>= 10.0.0'}cpu: [arm]os: [linux]- libc: [musl]'@parcel/[email protected]':resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==}engines: {node: '>= 10.0.0'}cpu: [arm64]os: [linux]- libc: [glibc]'@parcel/[email protected]':resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==}engines: {node: '>= 10.0.0'}cpu: [arm64]os: [linux]- libc: [musl]'@parcel/[email protected]':resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==}engines: {node: '>= 10.0.0'}cpu: [x64]os: [linux]- libc: [glibc]'@parcel/[email protected]':resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==}engines: {node: '>= 10.0.0'}cpu: [x64]os: [linux]- libc: [musl]'@parcel/[email protected]':resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==}@@ -1191,8 +1185,8 @@ packages:resolution: {integrity: sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==}engines: {node: '>=8.0.0'}- resolution: {integrity: sha512-6dLslJrQYB1qvqVPYRv1PhAA/uytC66nUeiTcq2JXiBzrmTWCHppqtGUjZhvnSRVatBCT5/SFdizdzcBiEiYUg==}+ resolution: {integrity: sha512-jZnCOtIgrt28esWP5z/PKndj/vPQ/Zt+cvNRlb/qOGnK/AjW1mASwPMtQ099NlSodf69RR3JrhnZCYbTWeDR4g==}engines: {node: '>= 12.20.55'}hasBin: true@@ -2858,9 +2852,9 @@ snapshots:- bluebird- supports-color- '@electron/[email protected]([email protected])':+ '@electron/[email protected]([email protected])':dependencies:- electron: 35.3.0+ electron: 35.2.2'@electron/[email protected]':dependencies:@@ -4025,7 +4019,7 @@ snapshots:transitivePeerDependencies:- supports-colordependencies:'@electron/get': 2.0.3'@types/node': 22.15.3diff --git a/app/src/boot/globalEvent/click.ts b/app/src/boot/globalEvent/click.tsindex e43571ee90..0c8d761684 100644--- a/app/src/boot/globalEvent/click.ts+++ b/app/src/boot/globalEvent/click.ts@@ -32,6 +32,13 @@ export const globalClick = (event: MouseEvent & { target: HTMLElement }) => {}}+ if (!hasTopClosestByClassName(event.target, "protyle-util") &&+ !hasTopClosestByClassName(event.target, "protyle-toolbar")) {+ document.querySelectorAll(".protyle-font").forEach((item: HTMLElement) => {+ item.parentElement.classList.add("fn__none");+ });+ }+const copyElement = hasTopClosestByClassName(event.target, "protyle-action__copy");if (copyElement) {let text = copyElement.parentElement.nextElementSibling.textContent.replace(/\n$/, "");diff --git a/app/src/protyle/ui/hideElements.ts b/app/src/protyle/ui/hideElements.tsindex 92b302b8a3..69514edec8 100644--- a/app/src/protyle/ui/hideElements.ts+++ b/app/src/protyle/ui/hideElements.ts@@ -62,10 +62,13 @@ export const hideAllElements = (types: string[]) => {if (types.includes("util")) {getAllEditor().forEach(item => {if (item.protyle.toolbar) {- item.protyle.toolbar.subElement.classList.add("fn__none");- if (item.protyle.toolbar.subElementCloseCB) {- item.protyle.toolbar.subElementCloseCB();- item.protyle.toolbar.subElementCloseCB = undefined;+ const pinElement = item.protyle.toolbar.subElement.querySelector('[data-type="pin"]');+ if (!pinElement || (pinElement && pinElement.getAttribute("aria-label") === window.siyuan.languages.pin)) {+ item.protyle.toolbar.subElement.classList.add("fn__none");+ if (item.protyle.toolbar.subElementCloseCB) {+ item.protyle.toolbar.subElementCloseCB();+ item.protyle.toolbar.subElementCloseCB = undefined;+ }}}});