mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-22 16:01:33 +03:00
2f79104bdb
Support issue [BS-2085](https://linear.app/affine-design/issue/BS-2085). ### What changed? - Refactor the `actionToAnswerRenderer` function to support reuse in both page mode and edgeless mode. - Add a new `page-response.ts` module to handle AI-generated answers in page mode. - Remove the redundant `edgelessHandler` function from `_common/config.ts`. - Introduce the `AIContext` class along with the `ctx` TypeScript type to standardize context management. - Implement the `createTemplateJob` function to enable AI slide insertion in both page mode and edgeless mode. Insert mindmap on page mode: <div class='graphite__hidden'> <div>🎥 Video uploaded on Graphite:</div> <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/30630d3e-ebd9-416b-9bb9-5f27086e48a3.mov"> <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/30630d3e-ebd9-416b-9bb9-5f27086e48a3.mov"> </a> </div> <video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/30630d3e-ebd9-416b-9bb9-5f27086e48a3.mov">mindmap.mov</video> Insert image on edgeless note <div class='graphite__hidden'> <div>🎥 Video uploaded on Graphite:</div> <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/b850ee5a-a06b-4ae7-8b68-ed5929a6e81a.mov"> <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/b850ee5a-a06b-4ae7-8b68-ed5929a6e81a.mov"> </a> </div> <video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/b850ee5a-a06b-4ae7-8b68-ed5929a6e81a.mov">image3.mov</video> Insert image on page mode: <div class='graphite__hidden'> <div>🎥 Video uploaded on Graphite:</div> <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/c4f98e2d-0b15-4310-b3e0-0725e330302b.mov"> <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/c4f98e2d-0b15-4310-b3e0-0725e330302b.mov"> </a> </div> <video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/c4f98e2d-0b15-4310-b3e0-0725e330302b.mov">image.mov</video> Generate image from image: <div class='graphite__hidden'> <div>🎥 Video uploaded on Graphite:</div> <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/2776a55f-cbb7-47ce-8e7d-7cae243fa3e9.mov"> <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/2776a55f-cbb7-47ce-8e7d-7cae243fa3e9.mov"> </a> </div> <video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/2776a55f-cbb7-47ce-8e7d-7cae243fa3e9.mov">image2.mov</video> Insert presentation on page mode: <div class='graphite__hidden'> <div>🎥 Video uploaded on Graphite:</div> <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/4e228fa5-88f4-478c-8b79-647612d5515c.mov"> <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/4e228fa5-88f4-478c-8b79-647612d5515c.mov"> </a> </div> <video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/4e228fa5-88f4-478c-8b79-647612d5515c.mov">ppt.mov</video> Insert make it real on page mode: <div class='graphite__hidden'> <div>🎥 Video uploaded on Graphite:</div> <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/c71139b2-fb55-4d89-84e2-d52eeb905b57.mov"> <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/c71139b2-fb55-4d89-84e2-d52eeb905b57.mov"> </a> </div> <video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/c71139b2-fb55-4d89-84e2-d52eeb905b57.mov">make it real.mov</video>
97 lines
2.9 KiB
JSON
97 lines
2.9 KiB
JSON
{
|
|
"name": "@affine/core",
|
|
"type": "module",
|
|
"private": true,
|
|
"version": "0.18.0",
|
|
"exports": {
|
|
"./*": "./src/*",
|
|
"./bootstrap": "./src/bootstrap/index.ts"
|
|
},
|
|
"dependencies": {
|
|
"@affine/component": "workspace:*",
|
|
"@affine/debug": "workspace:*",
|
|
"@affine/electron-api": "workspace:*",
|
|
"@affine/env": "workspace:*",
|
|
"@affine/graphql": "workspace:*",
|
|
"@affine/i18n": "workspace:*",
|
|
"@affine/templates": "workspace:*",
|
|
"@affine/track": "workspace:*",
|
|
"@blocksuite/affine": "0.19.1",
|
|
"@blocksuite/icons": "2.1.75",
|
|
"@capacitor/app": "^6.0.2",
|
|
"@capacitor/browser": "^6.0.4",
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dotlottie/player-component": "^2.7.12",
|
|
"@emotion/cache": "^11.14.0",
|
|
"@emotion/react": "^11.14.0",
|
|
"@floating-ui/dom": "^1.6.12",
|
|
"@juggle/resize-observer": "^3.4.0",
|
|
"@marsidev/react-turnstile": "^1.1.0",
|
|
"@preact/signals-core": "^1.8.0",
|
|
"@radix-ui/react-collapsible": "^1.1.2",
|
|
"@radix-ui/react-dialog": "^1.1.3",
|
|
"@radix-ui/react-popover": "^1.1.3",
|
|
"@radix-ui/react-scroll-area": "^1.2.2",
|
|
"@radix-ui/react-toolbar": "^1.1.1",
|
|
"@sentry/react": "^8.44.0",
|
|
"@toeverything/pdf-viewer": "^0.1.1",
|
|
"@toeverything/theme": "^1.1.1",
|
|
"@vanilla-extract/dynamic": "^2.1.2",
|
|
"animejs": "^3.2.2",
|
|
"bytes": "^3.1.2",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "^1.0.4",
|
|
"core-js": "^3.39.0",
|
|
"dayjs": "^1.11.13",
|
|
"file-type": "^19.6.0",
|
|
"filesize": "^10.1.6",
|
|
"foxact": "^0.2.43",
|
|
"fuse.js": "^7.0.0",
|
|
"graphemer": "^1.4.0",
|
|
"graphql": "^16.9.0",
|
|
"history": "^5.3.0",
|
|
"idb": "^8.0.0",
|
|
"idb-keyval": "^6.2.1",
|
|
"image-blob-reduce": "^4.1.0",
|
|
"is-svg": "^5.1.0",
|
|
"jotai": "^2.10.3",
|
|
"jotai-scope": "^0.7.2",
|
|
"lib0": "^0.2.99",
|
|
"lit": "^3.2.1",
|
|
"lodash-es": "^4.17.21",
|
|
"lottie-react": "^2.4.0",
|
|
"nanoid": "^5.0.9",
|
|
"next-themes": "^0.4.4",
|
|
"query-string": "^9.1.1",
|
|
"react": "19.0.0",
|
|
"react-dom": "19.0.0",
|
|
"react-error-boundary": "^4.1.2",
|
|
"react-router-dom": "^6.28.0",
|
|
"react-transition-state": "^2.2.0",
|
|
"react-virtuoso": "^4.12.3",
|
|
"rxjs": "^7.8.1",
|
|
"ses": "^1.10.0",
|
|
"socket.io-client": "^4.8.1",
|
|
"swr": "2.2.5",
|
|
"tinykeys": "patch:tinykeys@npm%3A2.1.0#~/.yarn/patches/tinykeys-npm-2.1.0-819feeaed0.patch",
|
|
"y-protocols": "^1.0.6",
|
|
"yjs": "patch:yjs@npm%3A13.6.18#~/.yarn/patches/yjs-npm-13.6.18-ad0d5f7c43.patch",
|
|
"zod": "^3.24.1"
|
|
},
|
|
"devDependencies": {
|
|
"@swc/core": "^1.10.1",
|
|
"@testing-library/dom": "^10.4.0",
|
|
"@testing-library/react": "^16.1.0",
|
|
"@types/animejs": "^3.1.12",
|
|
"@types/bytes": "^3.1.5",
|
|
"@types/image-blob-reduce": "^4.1.4",
|
|
"@types/lodash-es": "^4.17.12",
|
|
"@vanilla-extract/css": "^1.16.1",
|
|
"fake-indexeddb": "^6.0.0",
|
|
"lodash-es": "^4.17.21",
|
|
"vitest": "2.1.8"
|
|
}
|
|
}
|