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/18151
Vanessada07a129df6a
diff --git a/app/package.json b/app/package.jsonindex 51875f9077..93c0d9c92e 100644--- a/app/package.json+++ b/app/package.json@@ -54,16 +54,6 @@"devDependencies": {"@eslint/eslintrc": "^3.3.1","@eslint/js": "^9.24.0",- "@tiptap/core": "^3.24.0",- "@tiptap/extension-document": "^3.24.0",- "@tiptap/extension-hard-break": "^3.24.0",- "@tiptap/extension-history": "^3.24.0",- "@tiptap/extension-mention": "^3.24.0",- "@tiptap/extension-paragraph": "^3.24.0",- "@tiptap/extension-placeholder": "^3.24.0",- "@tiptap/extension-text": "^3.24.0",- "@tiptap/pm": "^3.24.0",- "@tiptap/suggestion": "^3.24.0","@types/node": "^18.13.0","@typescript-eslint/eslint-plugin": "^8.15.0","@typescript-eslint/parser": "^8.15.0",diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yamlindex 9cb014048d..dfb2c28f40 100644--- a/app/pnpm-lock.yaml+++ b/app/pnpm-lock.yaml@@ -21,36 +21,6 @@ importers:'@eslint/js':specifier: ^9.24.0version: 9.39.4- '@tiptap/core':- specifier: ^3.24.0- version: 3.24.0(@tiptap/[email protected])- '@tiptap/extension-document':- specifier: ^3.24.0- version: 3.24.0(@tiptap/[email protected](@tiptap/[email protected]))- '@tiptap/extension-hard-break':- specifier: ^3.24.0- version: 3.24.0(@tiptap/[email protected](@tiptap/[email protected]))- '@tiptap/extension-history':- specifier: ^3.24.0- version: 3.24.0(@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))- '@tiptap/extension-mention':- specifier: ^3.24.0- version: 3.24.0(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])(@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))- '@tiptap/extension-paragraph':- specifier: ^3.24.0- version: 3.24.0(@tiptap/[email protected](@tiptap/[email protected]))- '@tiptap/extension-placeholder':- specifier: ^3.24.0- version: 3.24.0(@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))- '@tiptap/extension-text':- specifier: ^3.24.0- version: 3.24.0(@tiptap/[email protected](@tiptap/[email protected]))- '@tiptap/pm':- specifier: ^3.24.0- version: 3.24.0- '@tiptap/suggestion':- specifier: ^3.24.0'@types/node':specifier: ^18.13.0version: 18.13.0@@ -152,11 +122,6 @@ packages:resolution: {integrity: sha512-OjKpjB7gohtEjZiq6nDx1egqjZJhGPN1iFOIED+NFhB/MMkXw/XRcHjh1DGXKT5z2W9eW7Jy2UKU3gpjvusFTQ==}engines: {node: '>=22.12.0'}- '@electron/[email protected]':- resolution: {integrity: sha512-hE2cQMZ5+4o7+6T2lUaVbxIzrOjZZfX7dB02xuapyYFJZEAiWTelq6J3mMoxzd0iONDvYLPVKecB5tyjIoVDVA==}- engines: {node: '>=10.12.0'}- hasBin: true-'@electron/[email protected]':resolution: {integrity: sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA==}engines: {node: '>=10.12.0'}@@ -706,63 +671,6 @@ packages:resolution: {integrity: sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==}engines: {node: '>=18'}- '@tiptap/[email protected]':- resolution: {integrity: sha512-GTAsXAI32p4hEZgPzvUv2RPrObxamy9AFhmhG10fXSvN/cDUs8naEYVIqDV3Sh99jMwQEbTFKW1E1mcspsY6ow==}- peerDependencies:- '@tiptap/pm': 3.24.0-- '@tiptap/[email protected]':- resolution: {integrity: sha512-yxgM3+yXy2XZzEwH43y2Kp8D1BkblxEWLXqo0YCoAKtxyKCcEaT8kdlf70kS7D0+VSzYU4D0iN7VdQIYHcL2mA==}- peerDependencies:- '@tiptap/core': 3.24.0-- '@tiptap/[email protected]':- resolution: {integrity: sha512-T/ZEBiHQPMyTqDvXG0tiqBToNeuSemIPmNtdoGSgBN/degVl7VJZqQIrLIvOUHfjf3QkRs7TE/mcqTJsIboO/g==}- peerDependencies:- '@tiptap/core': 3.24.0-- '@tiptap/[email protected]':- resolution: {integrity: sha512-pGRSXgJ+f3KIJq8kNq9mGJAN0ryJEZgBQq5Ag7Lk9Bo7OE+0SSYEs2gCEmY8+Thtw/YpICaVzx06pFy9DZt3eQ==}- peerDependencies:- '@tiptap/extensions': 3.24.0-- '@tiptap/[email protected]':- resolution: {integrity: sha512-c68AYrEoHJ4vlBvt5stBUTveKXiNwt5BxaQxgq2R4OXjc3VMoh+XJqo1bBbMNHEJfuGMNpcdfZ2zf09jnBf8/A==}- peerDependencies:- '@tiptap/core': 3.24.0- '@tiptap/pm': 3.24.0- '@tiptap/suggestion': 3.24.0-- '@tiptap/[email protected]':- resolution: {integrity: sha512-wD06aB6hO7LgcrlhGiw7I64k2tus9kNoICX5R+UecBSB1DVJdzKvXoXL2kPNv4DqYvljHdkIeK/OpuOTQd6MJA==}- peerDependencies:- '@tiptap/core': 3.24.0-- '@tiptap/[email protected]':- resolution: {integrity: sha512-3jfYYCIuwMADhvZ92vB6c80YiTmgTSFR23JqyLps8qkQtV59Va5CBYpwJtSs1+VrbCVnNxhZBHhVXusZO3uRkA==}- peerDependencies:- '@tiptap/extensions': 3.24.0-- '@tiptap/[email protected]':- resolution: {integrity: sha512-Im7keLPEihxm3+LyF+drYCoaOY5hlq35lvHAp/el6M8pJ/scts88HrYpdR1Yc4BtpZBIhfHSyWgPaupI4qwdeg==}- peerDependencies:- '@tiptap/core': 3.24.0-- '@tiptap/[email protected]':- resolution: {integrity: sha512-z6gRYzy2ucJp07OQ0F2W07NxyhMTxPYH1ia2eGiQkWax1i56oExpjMsDHP8THWlg8Tb7NnbfKpkfh881EsmofA==}- peerDependencies:- '@tiptap/core': 3.24.0- '@tiptap/pm': 3.24.0-- '@tiptap/[email protected]':- resolution: {integrity: sha512-QQP/78ryOZDN99gNBV7dgh69/8AYaOYQYFklq/iR+ZRFaaL3+qqHFvPVJapGkzPdymBgNJ34xjFM8n5pJ4QmMg==}-- '@tiptap/[email protected]':- resolution: {integrity: sha512-UlLIij1fxFy7tbCmqUoInWRijzsi8hsbaXKCx6L3KvLXtxHb4hMnDhd6W++rOk9Q1hDpmNf8qNIX498q/ZNstw==}- peerDependencies:- '@tiptap/core': 3.24.0- '@tiptap/pm': 3.24.0-'@types/[email protected]':resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==}@@ -968,10 +876,6 @@ packages:engines: {node: '>=0.4.0'}hasBin: true- resolution: {integrity: sha512-k2/tQ1+8Zf50dEUJWklUP80LcE/+Ph+OJ6cf2Ff2fD/c/TtCe6ofnCoNMz9UnyxOQYlaAALZtEWETzn+1JjfHg==}- engines: {node: '>= 14'}-resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==}engines: {node: '>= 14'}@@ -1648,10 +1552,6 @@ packages:resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==}engines: {node: '>=6 <7 || >=8'}- resolution: {integrity: sha512-pmEYSk3vYsG/bF651KPUXZ+hvjpgWYw/Gc7W9NFUe3ZVLczKKWIij3IKpOrQcdw4TILtibFslZ0UmR8Vvzig4g==}- engines: {node: '>=10'}-resolution: {integrity: sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==}engines: {node: '>=10'}@@ -2178,9 +2078,6 @@ packages:resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}engines: {node: '>= 0.8.0'}- resolution: {integrity: sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==}-resolution: {integrity: sha512-wBowNApzd45EIKdO1LaU+LrMBwAcjfPaYtVzV3lmfM3gf8Z4CHZsiIqlM8TZZ8okYvh5A1cP6gTfCRQtwUpaUg==}engines: {node: '>=14.16'}@@ -2362,45 +2259,6 @@ packages:resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==}- resolution: {integrity: sha512-96WBLhOaYhJ+kPhLg3uW359Tz6I/MfcrQfL4EGv4SrcqKEMC1gmoGrXHecPE8eOwTVCJ4IwgfzM8fFad25wNfw==}-- resolution: {integrity: sha512-rT7qZnQtx5c0/y/KlYaGvtG411S97UaL6gdp6RIZ23DLHanMYLyfGBV5DtSnZdthQql7W+lEVbpSfwtO8T+L2w==}-- resolution: {integrity: sha512-CCk6Gyx9+Tt2sbYk5NK0nB1ukHi2ryaRgadV/LvyNuO3ena1payM2z6Cg0vO1ebK8cxbzo41ku2DE5Axj1Zuiw==}-- resolution: {integrity: sha512-pMdYaEnjNMSwl11yjEGtgTmLkR08m/Vl+Jj443167p9eB3HVQKhYCc4gmHVDsLPODfZfjr/MmirsdyZziXbQKw==}-- resolution: {integrity: sha512-zlzTiH01eKA55UAf1MEjtssJeHnGxO0j4K4Dpx+gnmX9n+SHNlDqI2oO1Kv1iPN5B1dm5fsljCfqKF9nFL6HRg==}-- resolution: {integrity: sha512-7wj4uMjKaXWAQ1CDgxNzNtR9AlsuwzHfdFH1ygEHA2KHF2DOEaXl1CJfNPAKCg9qNEh4rum975QLaCiQPyY6Fw==}-- resolution: {integrity: sha512-4HucRlpiLd1IPQQXNqeo81BGtkY8Ai5smHhKW9jjPKRc2wQIxksg7Hl1tTI2IfT2B/LgX6bfYvXxEpJl7aKYKw==}-- resolution: {integrity: sha512-A79aN8QEFUwI6cax8Yq4Rpcx1TJZ3Kagn+ii7qLo4/V8H3mMiHrhFyhTyHHvpSnOgMPpWiDGSwM3etwrxE50ug==}-- resolution: {integrity: sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==}-- resolution: {integrity: sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==}-- resolution: {integrity: sha512-V/0cDCsHKHe/tfWkeCmthNUcEp1IVO3p6vwN8XtwE9PZQLAZJigbw3QoraAdfJPir4NKJtNvOB8oYGKRl+t0Dw==}-- resolution: {integrity: sha512-GxboyN4AMIsoHNtz5uf2r2Ru551i5hWeCMD6E2Ib4Eogqoub0NflniaBPVQ4MrGE5yZ8JV9tUHg9qcZTTrcN4w==}-- resolution: {integrity: sha512-TnKDdohEatgyZNGCDWIdccOHXhYloJwbwU+phw/a23KBvJIR9lWQWW7WHHK3vBdOLDNuF7TaX98GObUZOWkOnA==}-resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}engines: {node: '>=6'}@@ -2481,11 +2339,6 @@ packages:resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==}engines: {node: '>= 4'}- resolution: {integrity: sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==}- deprecated: Rimraf versions prior to v4 are no longer supported- hasBin: true-resolution: {integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==}deprecated: Rimraf versions prior to v4 are no longer supported@@ -2500,9 +2353,6 @@ packages:resolution: {integrity: sha512-AEjYvmAhlyxOeB9OqPUzQCo3kuAkNfuDk/HqWbZdFsqDFpapkTjiw+p4svNEoRLvuqNTxqfL+s+gtD4eDgZ+CA==}engines: {node: '>=8.0'}- resolution: {integrity: sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==}-resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}@@ -2829,9 +2679,6 @@ packages:resolution: {integrity: sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==}- resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==}-resolution: {integrity: sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==}engines: {node: '>=10.13.0'}@@ -2963,15 +2810,6 @@ snapshots:'@electron-internal/[email protected]': {}- '@electron/[email protected]':- dependencies:- chromium-pickle-js: 0.2.0- commander: 5.0.0- glob: 7.2.0- minimatch: 3.1.5- optionalDependencies:- '@types/glob': 7.2.0-'@electron/[email protected]':dependencies:commander: 5.0.0@@ -3266,7 +3104,7 @@ snapshots:'@isaacs/[email protected]':dependencies:string-width: 5.1.2- string-width-cjs: [email protected]+ string-width-cjs: [email protected]strip-ansi: 7.2.0strip-ansi-cjs: [email protected]wrap-ansi: 8.1.0@@ -3304,7 +3142,7 @@ snapshots:'@malept/[email protected]':dependencies:debug: 4.4.3- fs-extra: 9.0.0+ fs-extra: 9.0.1lodash: 4.18.1tmp-promise: 3.0.3transitivePeerDependencies:@@ -3406,66 +3244,6 @@ snapshots:'@sindresorhus/[email protected]': {}- '@tiptap/[email protected](@tiptap/[email protected])':- dependencies:- '@tiptap/pm': 3.24.0-- dependencies:- '@tiptap/core': 3.24.0(@tiptap/[email protected])-- dependencies:- '@tiptap/core': 3.24.0(@tiptap/[email protected])-- '@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))':- dependencies:- '@tiptap/extensions': 3.24.0(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])-- '@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])(@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))':- dependencies:- '@tiptap/core': 3.24.0(@tiptap/[email protected])- '@tiptap/pm': 3.24.0- '@tiptap/suggestion': 3.24.0(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])-- dependencies:- '@tiptap/core': 3.24.0(@tiptap/[email protected])-- '@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))':- dependencies:- '@tiptap/extensions': 3.24.0(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])-- dependencies:- '@tiptap/core': 3.24.0(@tiptap/[email protected])-- '@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])':- dependencies:- '@tiptap/core': 3.24.0(@tiptap/[email protected])- '@tiptap/pm': 3.24.0-- '@tiptap/[email protected]':- dependencies:- prosemirror-changeset: 2.4.1- prosemirror-commands: 1.7.1- prosemirror-dropcursor: 1.8.2- prosemirror-gapcursor: 1.4.1- prosemirror-history: 1.5.0- prosemirror-inputrules: 1.5.1- prosemirror-keymap: 1.2.3- prosemirror-model: 1.25.7- prosemirror-schema-list: 1.5.1- prosemirror-state: 1.4.4- prosemirror-tables: 1.8.5- prosemirror-transform: 1.12.0- prosemirror-view: 1.41.8-- '@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])':- dependencies:- '@tiptap/core': 3.24.0(@tiptap/[email protected])- '@tiptap/pm': 3.24.0-'@types/[email protected]':dependencies:'@types/ms': 2.1.0@@ -3484,7 +3262,7 @@ snapshots:'@types/[email protected]':dependencies:- '@types/node': 25.6.2+ '@types/node': 18.13.0'@types/[email protected]':dependencies:@@ -3718,12 +3496,6 @@ snapshots:- dependencies:- debug: 4.4.3- transitivePeerDependencies:- - supports-color-dependencies:debug: 4.4.3@@ -4224,7 +3996,7 @@ snapshots:dependencies:- '@electron/asar': 3.2.1+ '@electron/asar': 3.4.1debug: 4.4.3fs-extra: 7.0.1lodash: 4.18.1@@ -4531,13 +4303,6 @@ snapshots:jsonfile: 4.0.0universalify: 0.1.2- dependencies:- at-least-node: 1.0.0- graceful-fs: 4.2.11- jsonfile: 6.2.1- universalify: 1.0.0-dependencies:at-least-node: 1.0.0@@ -4742,7 +4507,7 @@ snapshots:dependencies:- agent-base: 7.0.2+ agent-base: 7.1.0debug: 4.4.3transitivePeerDependencies:- supports-color@@ -5067,8 +4832,6 @@ snapshots:type-check: 0.4.0word-wrap: 1.2.5- [email protected]: {}-@@ -5234,80 +4997,6 @@ snapshots:retry: 0.12.0signal-exit: 3.0.7- dependencies:- prosemirror-transform: 1.12.0-- dependencies:- prosemirror-model: 1.25.7- prosemirror-state: 1.4.4- prosemirror-transform: 1.12.0-- dependencies:- prosemirror-state: 1.4.4- prosemirror-transform: 1.12.0- prosemirror-view: 1.41.8-- dependencies:- prosemirror-keymap: 1.2.3- prosemirror-model: 1.25.7- prosemirror-state: 1.4.4- prosemirror-view: 1.41.8-- dependencies:- prosemirror-state: 1.4.4- prosemirror-transform: 1.12.0- prosemirror-view: 1.41.8- rope-sequence: 1.3.4-- dependencies:- prosemirror-state: 1.4.4- prosemirror-transform: 1.12.0-- dependencies:- prosemirror-state: 1.4.4- w3c-keyname: 2.2.8-- dependencies:- orderedmap: 2.1.1-- dependencies:- prosemirror-model: 1.25.7- prosemirror-state: 1.4.4- prosemirror-transform: 1.12.0-- dependencies:- prosemirror-model: 1.25.7- prosemirror-transform: 1.12.0- prosemirror-view: 1.41.8-- dependencies:- prosemirror-keymap: 1.2.3- prosemirror-model: 1.25.7- prosemirror-state: 1.4.4- prosemirror-transform: 1.12.0- prosemirror-view: 1.41.8-- dependencies:- prosemirror-model: 1.25.7-- dependencies:- prosemirror-model: 1.25.7- prosemirror-state: 1.4.4- prosemirror-transform: 1.12.0-@@ -5383,10 +5072,6 @@ snapshots:- dependencies:- glob: 7.2.0-dependencies:glob: 7.2.0@@ -5405,8 +5090,6 @@ snapshots:sprintf-js: 1.1.3optional: true- [email protected]: {}-@@ -5569,7 +5252,7 @@ snapshots:dependencies:mkdirp: 0.5.6- rimraf: 2.6.2+ rimraf: 2.6.3dependencies:@@ -5675,8 +5358,6 @@ snapshots:- [email protected]: {}-dependencies:glob-to-regexp: 0.4.1diff --git a/app/src/assets/scss/business/_ai_agent.scss b/app/src/assets/scss/business/_ai_agent.scssindex cb6617320d..bb2c22d8c1 100644--- a/app/src/assets/scss/business/_ai_agent.scss+++ b/app/src/assets/scss/business/_ai_agent.scss@@ -440,7 +440,7 @@.agent-chat__thinking-body--preview {max-height: 120px;overflow-y: auto;- contain: none; // 覆盖 base 的 contain:layout paint,该值会阻止 JS 设置 scrollTop 生效+ contain: none; // 覆盖 base 的 contain:layout paint,该值会阻止 JS 设置 scrollTop 生效// 隐藏滚动条,保持预览态视觉干净(内容通过 JS 自动滚到底部)。scrollbar-width: none;@@ -599,28 +599,10 @@display: flex;gap: 8px;margin-top: 8px;-}--// 思考强度:iconBrain 图标嵌入原生 select 左侧,与旁边的模型 select 外观一致。-.agent-chat__reasoning-effort {- position: relative;- display: inline-flex;-- // iconBrain 绝对定位到 select 左内侧,不拦截 select 点击。- & > svg {- position: absolute;- left: 6px;- top: 50%;- transform: translateY(-50%);- height: 14px;- width: 14px;- color: var(--b3-theme-on-surface);- pointer-events: none;- }+ overflow: auto;- // 文字右移让出图标空间(b3-select 原始左 padding 为 8px)。- .agent-chat__reasoning-effort-select {- padding-left: 26px;+ &::-webkit-scrollbar {+ display: none;}}@@ -981,7 +963,8 @@}}-.agent-composer__pm {+// 迷你 protyle 输入框:复用 .protyle-wysiwyg,此处只约束尺寸(min/max-height、滚动)。+.agent-chat__composer-host .protyle-wysiwyg {outline: none;font-size: 14px;line-height: 1.6;@@ -989,29 +972,5 @@min-height: 24px;max-height: 120px;overflow-y: auto;-}--.agent-composer__pm p {- margin: 0;-}--.agent-composer__pm p.is-editor-empty:first-child::before {- content: attr(data-placeholder);- color: var(--b3-theme-on-surface-light);- pointer-events: none;- float: left;- height: 0;-}--.agent-mention-chip {- display: inline;- padding: 1px 4px;- margin: 0 2px;- background: var(--b3-theme-primary-lightest);- color: var(--b3-theme-primary);- border-radius: var(--b3-border-radius);- font-size: 13px;- font-weight: 500;- white-space: nowrap;- user-select: all;+ padding: 0;}diff --git a/app/src/layout/dock/agent/AgentChat.ts b/app/src/layout/dock/agent/AgentChat.tsindex 64d49c56d4..a4efd96cd8 100644--- a/app/src/layout/dock/agent/AgentChat.ts+++ b/app/src/layout/dock/agent/AgentChat.ts@@ -245,9 +245,9 @@ export class AgentChat extends Model {"</svg>" +"</span>" +'<select class="b3-select b3-select--noborder" tabindex="0"></select>' +- '<span class="agent-chat__reasoning-effort b3-tooltips b3-tooltips__n" aria-label="' + (L.reasoningEffortTooltip || "Reasoning effort") + '"><select class="b3-select b3-select--noborder agent-chat__reasoning-effort-select" tabindex="0"></select><svg><use xlink:href="#iconBrain"></use></svg></span>' +- '<button class="agent-chat__send b3-button b3-button--icon b3-button--text b3-tooltips b3-tooltips__n" aria-label="' + (L.agentSend || "Send") + '"><svg><use xlink:href="#iconSend"></use></svg></button>' +- '<button class="agent-chat__stop b3-button b3-button--icon b3-button--cancel fn__none b3-tooltips b3-tooltips__n" aria-label="' + (L.agentStop || "Stop") + '"><svg><use xlink:href="#iconSquareStop"></use></svg></button>' ++ '<div class="b3-form__icon ariaLabel" aria-label="' + (L.reasoningEffortTooltip || "Reasoning effort") + '"><svg class="b3-form__icon-icon"><use xlink:href="#iconBrain"></use></svg><select class="b3-select b3-select--noborder b3-form__icon-input" tabindex="0"></select></div>' ++ '<button class="agent-chat__send b3-button b3-button--icon b3-button--text ariaLabel" aria-label="' + (L.agentSend || "Send") + '"><svg><use xlink:href="#iconSend"></use></svg></button>' ++ '<button class="agent-chat__stop b3-button b3-button--icon b3-button--cancel fn__none ariaLabel" aria-label="' + (L.agentStop || "Stop") + '"><svg><use xlink:href="#iconSquareStop"></use></svg></button>' +"</div>" +"</div>" +'<div class="agent-chat__preview-notice">' + (L.featurePreview || "") + "</div>" +@@ -262,7 +262,7 @@ export class AgentChat extends Model {this.titleElement = panel.querySelector(".agent-chat__title") as HTMLElement;this.tokenDisplayEl = panel.querySelector(".agent-chat__tokens") as HTMLElement;this.modelSelect = panel.querySelector(".b3-select") as HTMLSelectElement;- this.reasoningEffortSelect = panel.querySelector(".agent-chat__reasoning-effort-select") as HTMLSelectElement;+ this.reasoningEffortSelect = panel.querySelector(".b3-form__icon-input") as HTMLSelectElement;this.initReasoningEffortSelect();this.scrollBottomBtn = panel.querySelector(".agent-chat__scroll-bottom") as HTMLElement;this.messagesContainer.addEventListener("scroll", () => {@@ -2370,7 +2370,7 @@ export class AgentChat extends Model {el.innerHTML = '<div class="agent-chat__snapshot-body">' +'<span class="agent-chat__snapshot-icon"><svg><use xlink:href="#iconHistory"></use></svg></span>' +'<span class="agent-chat__snapshot-text">' + escapeHtml((L.snapshotAutoCreated || "Auto snapshot created") + " " + shortID) + "</span>" +- '<button class="b3-button b3-button--text agent-chat__snapshot-rollback b3-tooltips b3-tooltips__n" aria-label="' + (L.rollback || "Rollback") + '"><svg><use xlink:href="#iconUndo"></use></svg></button>' ++ '<button class="b3-button b3-button--text agent-chat__snapshot-rollback ariaLabel" aria-label="' + (L.rollback || "Rollback") + '"><svg><use xlink:href="#iconUndo"></use></svg></button>' +"</div>";const rollbackBtn = el.querySelector(".agent-chat__snapshot-rollback") as HTMLButtonElement;rollbackBtn.addEventListener("click", () => {diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.tsindex e82128de81..2a88d62166 100644--- a/app/src/protyle/hint/extend.ts+++ b/app/src/protyle/hint/extend.ts@@ -135,22 +135,22 @@ export const hintSlash = (key: string, protyle: IProtyle) => {id: "calloutNote",value: `> [!NOTE]\n> ${Lute.Caret}`,html: `<div class="b3-list-item__first"><span class="b3-list-item__graphic">✏️</span><span class="b3-list-item__text">${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-note)">Note</span></span></div>`,- },{+ }, {filter: [window.siyuan.languages.callout, "callout", "ts", "提示", "tishi", "tip"],id: "calloutTip",value: `> [!TIP]\n> ${Lute.Caret}`,html: `<div class="b3-list-item__first"><span class="b3-list-item__graphic">💡</span><span class="b3-list-item__text">${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-tip)">Tip</span></span></div>`,- },{+ }, {filter: [window.siyuan.languages.callout, "callout", "ts", "提示", "tishi", "important"],id: "calloutImportant",value: `> [!IMPORTANT]\n> ${Lute.Caret}`,html: `<div class="b3-list-item__first"><span class="b3-list-item__graphic">❗</span><span class="b3-list-item__text">${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-important)">Important</span></span></div>`,- },{+ }, {filter: [window.siyuan.languages.callout, "callout", "ts", "提示", "tishi", "warning"],id: "calloutWarning",value: `> [!WARNING]\n> ${Lute.Caret}`,html: `<div class="b3-list-item__first"><span class="b3-list-item__graphic">⚠️</span><span class="b3-list-item__text">${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-warning)">Warning</span></span></div>`,- },{+ }, {filter: [window.siyuan.languages.callout, "callout", "ts", "提示", "tishi", "caution"],id: "calloutCaution",value: `> [!CAUTION]\n> ${Lute.Caret}`,@@ -458,16 +458,21 @@ export const genHintItemHTML = (item: IBlock) => {export const hintRef = (key: string, protyle: IProtyle, source: THintSource): IHintData[] => {const nodeElement = hasClosestBlock(getEditorRange(protyle.wysiwyg.element).startContainer);protyle.hint.genLoading(protyle);- const refParam: IObject = {- k: key,- id: nodeElement ? nodeElement.getAttribute("data-node-id") : protyle.block.parentID,- beforeLen: Math.floor((Math.max(protyle.element.clientWidth / 2, 320) - 58) / 28.8),- rootID: source === "av" ? "" : protyle.block.rootID,- isDatabase: source === "av",- isSquareBrackets: ["[[", "【【"].includes(protyle.hint.splitChar)- };- if (isEncryptedBox(protyle.notebookId)) {- refParam.notebook = protyle.notebookId;+ let refParam: IObject;+ if (protyle.lite) {+ refParam = {k: key, id: "", rootID: "", beforeLen: 48, isDatabase: false, isSquareBrackets: true};+ } else {+ refParam = {+ k: key,+ id: nodeElement ? nodeElement.getAttribute("data-node-id") : protyle.block.parentID,+ beforeLen: Math.floor((Math.max(protyle.element.clientWidth / 2, 320) - 58) / 28.8),+ rootID: source === "av" ? "" : protyle.block.rootID,+ isDatabase: source === "av",+ isSquareBrackets: ["[[", "【【"].includes(protyle.hint.splitChar)+ };+ if (isEncryptedBox(protyle.notebookId)) {+ refParam.notebook = protyle.notebookId;+ }}fetchPost("/api/search/searchRefBlock", refParam, (response) => {const dataList: IHintData[] = [];diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.tsindex 21b8f3103c..0436d5c421 100644--- a/app/src/protyle/index.ts+++ b/app/src/protyle/index.ts@@ -61,7 +61,7 @@ export class Protyle {* @param id 要挂载 Protyle 的元素或者元素 ID。* @param options Protyle 参数*/- constructor(app: App, id: HTMLElement, options?: IProtyleOptions) {+ constructor(app: App, id: HTMLElement, options: IProtyleOptions) {this.version = Constants.SIYUAN_VERSION;let pluginsOptions: IProtyleOptions = options;app.plugins.forEach(item => {@@ -76,6 +76,7 @@ export class Protyle {app,id: genUUID(),disabled: false,+ lite: !!options.lite,updated: false,element: id,options: mergedOptions,diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.tsindex 264d4159e2..fa3dda1d4b 100644--- a/app/src/protyle/wysiwyg/transaction.ts+++ b/app/src/protyle/wysiwyg/transaction.ts@@ -1466,6 +1466,9 @@ export const transaction = (protyle: IProtyle, doOperations: IOperation[], undoOif (doOperations.length === 0) {return;}+ if (protyle?.lite) {+ return;+ }if (!protyle) {// 文档树中点开属性->数据库后的变更操作 & 文档树添加到数据库fetchPost("/api/transactions", {diff --git a/app/src/types/protyle.d.ts b/app/src/types/protyle.d.tsindex 510e631327..e431aa8814 100644--- a/app/src/types/protyle.d.ts+++ b/app/src/types/protyle.d.ts@@ -509,6 +509,9 @@ interface IProtyleOptions {/** 编辑器异步渲染完成后的回调方法 */after?(protyle: import("../protyle").Protyle): void;++ /** 精简版本 */+ lite?: boolean;}interface IProtyle {@@ -542,6 +545,7 @@ interface IProtyle {action?: TProtyleAction[]},disabled: boolean,+ lite?: boolean,selectElement?: HTMLElement,ws?: import("../layout/Model").Model,notebookId?: string