mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore: bump version (#2787)
This commit is contained in:
@@ -41,18 +41,18 @@
|
|||||||
"@electron-forge/maker-squirrel": "^6.1.1",
|
"@electron-forge/maker-squirrel": "^6.1.1",
|
||||||
"@electron-forge/maker-zip": "^6.1.1",
|
"@electron-forge/maker-zip": "^6.1.1",
|
||||||
"@electron-forge/shared-types": "^6.1.1",
|
"@electron-forge/shared-types": "^6.1.1",
|
||||||
"@electron/remote": "2.0.9",
|
"@electron/remote": "2.0.10",
|
||||||
"@toeverything/infra": "workspace:*",
|
"@toeverything/infra": "workspace:*",
|
||||||
"@types/fs-extra": "^11.0.1",
|
"@types/fs-extra": "^11.0.1",
|
||||||
"@types/uuid": "^9.0.1",
|
"@types/uuid": "^9.0.2",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"electron": "=25.0.1",
|
"electron": "^25.1.1",
|
||||||
"electron-log": "^5.0.0-beta.24",
|
"electron-log": "^5.0.0-beta.24",
|
||||||
"electron-squirrel-startup": "1.0.0",
|
"electron-squirrel-startup": "1.0.0",
|
||||||
"electron-window-state": "^5.0.3",
|
"electron-window-state": "^5.0.3",
|
||||||
"esbuild": "^0.17.19",
|
"esbuild": "^0.18.2",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.1.1",
|
||||||
"jotai": "^2.1.1",
|
"jotai": "^2.2.0",
|
||||||
"playwright": "=1.33.0",
|
"playwright": "=1.33.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"undici": "^5.22.1",
|
"undici": "^5.22.1",
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"nanoid": "^4.0.2",
|
"nanoid": "^4.0.2",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"yjs": "^13.6.1"
|
"yjs": "^13.6.2"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"protocols": [
|
"protocols": [
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
"postinstall": "prisma generate"
|
"postinstall": "prisma generate"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/server": "^4.7.1",
|
"@apollo/server": "^4.7.3",
|
||||||
"@nestjs/apollo": "^11.0.6",
|
"@nestjs/apollo": "^11.0.6",
|
||||||
"@nestjs/common": "^9.4.2",
|
"@nestjs/common": "^9.4.3",
|
||||||
"@nestjs/core": "^9.4.2",
|
"@nestjs/core": "^9.4.3",
|
||||||
"@nestjs/graphql": "^11.0.6",
|
"@nestjs/graphql": "^11.0.6",
|
||||||
"@nestjs/platform-express": "^9.4.2",
|
"@nestjs/platform-express": "^9.4.3",
|
||||||
"@node-rs/bcrypt": "^1.7.1",
|
"@node-rs/bcrypt": "^1.7.1",
|
||||||
"@prisma/client": "^4.15.0",
|
"@prisma/client": "^4.15.0",
|
||||||
"dotenv": "^16.1.4",
|
"dotenv": "^16.1.4",
|
||||||
@@ -33,18 +33,18 @@
|
|||||||
"rxjs": "^7.8.1"
|
"rxjs": "^7.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nestjs/testing": "^9.4.2",
|
"@nestjs/testing": "^9.4.3",
|
||||||
"@types/express": "^4.17.17",
|
"@types/express": "^4.17.17",
|
||||||
"@types/jsonwebtoken": "^9.0.2",
|
"@types/jsonwebtoken": "^9.0.2",
|
||||||
"@types/lodash-es": "^4.17.7",
|
"@types/lodash-es": "^4.17.7",
|
||||||
"@types/node": "^18.16.16",
|
"@types/node": "^18.16.18",
|
||||||
"@types/supertest": "^2.0.12",
|
"@types/supertest": "^2.0.12",
|
||||||
"c8": "^7.14.0",
|
"c8": "^8.0.0",
|
||||||
"nodemon": "^2.0.22",
|
"nodemon": "^2.0.22",
|
||||||
"supertest": "^6.3.3",
|
"supertest": "^6.3.3",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.1.3",
|
"typescript": "^5.1.3",
|
||||||
"vitest": "^0.31.4"
|
"vitest": "^0.32.0"
|
||||||
},
|
},
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
"exec": "node",
|
"exec": "node",
|
||||||
|
|||||||
@@ -28,57 +28,57 @@
|
|||||||
"@dnd-kit/core": "^6.0.8",
|
"@dnd-kit/core": "^6.0.8",
|
||||||
"@dnd-kit/sortable": "^7.0.2",
|
"@dnd-kit/sortable": "^7.0.2",
|
||||||
"@emotion/cache": "^11.11.0",
|
"@emotion/cache": "^11.11.0",
|
||||||
"@emotion/react": "^11.11.0",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/server": "^11.11.0",
|
"@emotion/server": "^11.11.0",
|
||||||
"@emotion/styled": "^11.11.0",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@mui/material": "^5.13.3",
|
"@mui/material": "^5.13.5",
|
||||||
"@react-hookz/web": "^23.0.1",
|
"@react-hookz/web": "^23.0.1",
|
||||||
"@sentry/nextjs": "^7.54.0",
|
"@sentry/nextjs": "^7.55.2",
|
||||||
"@toeverything/hooks": "workspace:*",
|
"@toeverything/hooks": "workspace:*",
|
||||||
"@toeverything/infra": "workspace:*",
|
"@toeverything/infra": "workspace:*",
|
||||||
"@toeverything/plugin-infra": "workspace:*",
|
"@toeverything/plugin-infra": "workspace:*",
|
||||||
"cmdk": "^0.2.0",
|
"cmdk": "^0.2.0",
|
||||||
"css-spring": "^4.1.0",
|
"css-spring": "^4.1.0",
|
||||||
"graphql": "^16.6.0",
|
"graphql": "^16.6.0",
|
||||||
"jotai": "^2.1.1",
|
"jotai": "^2.2.0",
|
||||||
"jotai-devtools": "^0.5.3",
|
"jotai-devtools": "^0.5.3",
|
||||||
"lit": "^2.7.5",
|
"lit": "^2.7.5",
|
||||||
"lottie-web": "^5.12.0",
|
"lottie-web": "^5.12.2",
|
||||||
"next-themes": "^0.2.1",
|
"next-themes": "^0.2.1",
|
||||||
"react": "18.3.0-canary-16d053d59-20230506",
|
"react": "18.3.0-canary-16d053d59-20230506",
|
||||||
"react-dom": "18.3.0-canary-16d053d59-20230506",
|
"react-dom": "18.3.0-canary-16d053d59-20230506",
|
||||||
"react-is": "^18.2.0",
|
"react-is": "^18.2.0",
|
||||||
"react-resizable-panels": "^0.0.48",
|
"react-resizable-panels": "^0.0.51",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"swr": "^2.1.5",
|
"swr": "^2.1.5",
|
||||||
"y-protocols": "^1.0.5",
|
"y-protocols": "^1.0.5",
|
||||||
"yjs": "^13.6.1",
|
"yjs": "^13.6.2",
|
||||||
"zod": "^3.21.4"
|
"zod": "^3.21.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@perfsee/webpack": "^1.8.1",
|
"@perfsee/webpack": "^1.8.2",
|
||||||
"@redux-devtools/extension": "^3.2.5",
|
"@redux-devtools/extension": "^3.2.5",
|
||||||
"@rich-data/viewer": "^2.15.6",
|
"@rich-data/viewer": "^2.15.6",
|
||||||
"@sentry/webpack-plugin": "^1.20.1",
|
"@sentry/webpack-plugin": "^1.20.1",
|
||||||
"@swc-jotai/debug-label": "^0.0.10",
|
"@swc-jotai/debug-label": "^0.0.10",
|
||||||
"@swc-jotai/react-refresh": "^0.0.8",
|
"@swc-jotai/react-refresh": "^0.0.8",
|
||||||
"@types/react": "^18.2.6",
|
"@types/react": "^18.2.12",
|
||||||
"@types/react-dom": "^18.2.4",
|
"@types/react-dom": "^18.2.5",
|
||||||
"@types/webpack-env": "^1.18.1",
|
"@types/webpack-env": "^1.18.1",
|
||||||
"@vanilla-extract/css": "^1.11.0",
|
"@vanilla-extract/css": "^1.11.1",
|
||||||
"@vanilla-extract/next-plugin": "=2.1.2",
|
"@vanilla-extract/next-plugin": "=2.1.2",
|
||||||
"dotenv": "^16.1.4",
|
"dotenv": "^16.1.4",
|
||||||
"eslint": "^8.42.0",
|
"eslint": "^8.42.0",
|
||||||
"eslint-config-next": "^13.4.4",
|
"eslint-config-next": "^13.4.5",
|
||||||
"eslint-plugin-unicorn": "^47.0.0",
|
"eslint-plugin-unicorn": "^47.0.0",
|
||||||
"next": "=13.4.2",
|
"next": "=13.4.2",
|
||||||
"next-debug-local": "^0.1.5",
|
"next-debug-local": "^0.1.5",
|
||||||
"next-router-mock": "^0.9.3",
|
"next-router-mock": "^0.9.6",
|
||||||
"raw-loader": "^4.0.2",
|
"raw-loader": "^4.0.2",
|
||||||
"redux": "^4.2.1",
|
"redux": "^4.2.1",
|
||||||
"swc-plugin-coverage-instrument": "^0.0.18",
|
"swc-plugin-coverage-instrument": "^0.0.18",
|
||||||
"typescript": "^5.1.3",
|
"typescript": "^5.1.3",
|
||||||
"webpack": "^5.85.0"
|
"webpack": "^5.87.0"
|
||||||
},
|
},
|
||||||
"stableVersion": "0.0.0"
|
"stableVersion": "0.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
18
package.json
18
package.json
@@ -51,20 +51,20 @@
|
|||||||
"@faker-js/faker": "^8.0.2",
|
"@faker-js/faker": "^8.0.2",
|
||||||
"@istanbuljs/schema": "^0.1.3",
|
"@istanbuljs/schema": "^0.1.3",
|
||||||
"@magic-works/i18n-codegen": "^0.5.0",
|
"@magic-works/i18n-codegen": "^0.5.0",
|
||||||
"@perfsee/sdk": "^1.8.1",
|
"@perfsee/sdk": "^1.8.2",
|
||||||
"@playwright/test": "=1.33.0",
|
"@playwright/test": "=1.33.0",
|
||||||
"@taplo/cli": "^0.5.2",
|
"@taplo/cli": "^0.5.2",
|
||||||
"@testing-library/react": "^14.0.0",
|
"@testing-library/react": "^14.0.0",
|
||||||
"@toeverything/infra": "workspace:*",
|
"@toeverything/infra": "workspace:*",
|
||||||
"@toeverything/plugin-infra": "workspace:*",
|
"@toeverything/plugin-infra": "workspace:*",
|
||||||
"@types/eslint": "^8.40.0",
|
"@types/eslint": "^8.40.2",
|
||||||
"@types/node": "^18.16.16",
|
"@types/node": "^18.16.18",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
"@typescript-eslint/eslint-plugin": "^5.59.11",
|
||||||
"@typescript-eslint/parser": "^5.59.8",
|
"@typescript-eslint/parser": "^5.59.11",
|
||||||
"@vanilla-extract/vite-plugin": "^3.8.2",
|
"@vanilla-extract/vite-plugin": "^3.8.2",
|
||||||
"@vitejs/plugin-react": "^4.0.0",
|
"@vitejs/plugin-react": "^4.0.0",
|
||||||
"@vitest/coverage-istanbul": "^0.31.4",
|
"@vitest/coverage-istanbul": "^0.32.0",
|
||||||
"@vitest/ui": "^0.31.4",
|
"@vitest/ui": "^0.32.0",
|
||||||
"eslint": "^8.42.0",
|
"eslint": "^8.42.0",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "^8.8.0",
|
||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-plugin-import": "^2.27.5",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"lint-staged": "^13.2.2",
|
"lint-staged": "^13.2.2",
|
||||||
"madge": "^6.1.0",
|
"madge": "^6.1.0",
|
||||||
"msw": "^1.2.1",
|
"msw": "^1.2.2",
|
||||||
"nanoid": "^4.0.2",
|
"nanoid": "^4.0.2",
|
||||||
"nx": "16.3.2",
|
"nx": "16.3.2",
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
"vite": "^4.3.9",
|
"vite": "^4.3.9",
|
||||||
"vite-plugin-istanbul": "^4.1.0",
|
"vite-plugin-istanbul": "^4.1.0",
|
||||||
"vite-tsconfig-paths": "^4.2.0",
|
"vite-tsconfig-paths": "^4.2.0",
|
||||||
"vitest": "^0.31.4",
|
"vitest": "^0.32.0",
|
||||||
"vitest-fetch-mock": "^0.2.2",
|
"vitest-fetch-mock": "^0.2.2",
|
||||||
"vitest-mock-extended": "^1.1.3"
|
"vitest-mock-extended": "^1.1.3"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -23,12 +23,12 @@
|
|||||||
"@dnd-kit/core": "^6.0.8",
|
"@dnd-kit/core": "^6.0.8",
|
||||||
"@dnd-kit/sortable": "^7.0.2",
|
"@dnd-kit/sortable": "^7.0.2",
|
||||||
"@emotion/cache": "^11.11.0",
|
"@emotion/cache": "^11.11.0",
|
||||||
"@emotion/react": "^11.11.0",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/server": "^11.11.0",
|
"@emotion/server": "^11.11.0",
|
||||||
"@emotion/styled": "^11.11.0",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@mui/base": "5.0.0-beta.3",
|
"@mui/base": "5.0.0-beta.4",
|
||||||
"@mui/icons-material": "^5.11.16",
|
"@mui/icons-material": "^5.11.16",
|
||||||
"@mui/material": "^5.13.3",
|
"@mui/material": "^5.13.5",
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
"@radix-ui/react-avatar": "^1.0.3",
|
"@radix-ui/react-avatar": "^1.0.3",
|
||||||
"@radix-ui/react-collapsible": "^1.0.3",
|
"@radix-ui/react-collapsible": "^1.0.3",
|
||||||
@@ -40,13 +40,13 @@
|
|||||||
"@vanilla-extract/dynamic": "^2.0.3",
|
"@vanilla-extract/dynamic": "^2.0.3",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"dayjs": "^1.11.8",
|
"dayjs": "^1.11.8",
|
||||||
"jotai": "^2.1.1",
|
"jotai": "^2.2.0",
|
||||||
"lit": "^2.7.5",
|
"lit": "^2.7.5",
|
||||||
"lottie-web": "^5.12.0",
|
"lottie-web": "^5.12.2",
|
||||||
"react": "18.3.0-canary-16d053d59-20230506",
|
"react": "18.3.0-canary-16d053d59-20230506",
|
||||||
"react-datepicker": "^4.12.0",
|
"react-datepicker": "^4.13.0",
|
||||||
"react-dom": "18.3.0-canary-16d053d59-20230506",
|
"react-dom": "18.3.0-canary-16d053d59-20230506",
|
||||||
"react-error-boundary": "^4.0.9",
|
"react-error-boundary": "^4.0.10",
|
||||||
"react-is": "^18.2.0",
|
"react-is": "^18.2.0",
|
||||||
"rxjs": "^7.8.1"
|
"rxjs": "^7.8.1"
|
||||||
},
|
},
|
||||||
@@ -57,14 +57,14 @@
|
|||||||
"@blocksuite/icons": "^2.1.19",
|
"@blocksuite/icons": "^2.1.19",
|
||||||
"@blocksuite/lit": "0.0.0-20230607055421-9b20fcaf-nightly",
|
"@blocksuite/lit": "0.0.0-20230607055421-9b20fcaf-nightly",
|
||||||
"@blocksuite/store": "0.0.0-20230607055421-9b20fcaf-nightly",
|
"@blocksuite/store": "0.0.0-20230607055421-9b20fcaf-nightly",
|
||||||
"@types/react": "^18.2.6",
|
"@types/react": "^18.2.12",
|
||||||
"@types/react-datepicker": "^4.11.2",
|
"@types/react-datepicker": "^4.11.2",
|
||||||
"@types/react-dnd": "^3.0.2",
|
"@types/react-dnd": "^3.0.2",
|
||||||
"@types/react-dom": "18.2.4",
|
"@types/react-dom": "18.2.5",
|
||||||
"@vanilla-extract/css": "^1.11.0",
|
"@vanilla-extract/css": "^1.11.1",
|
||||||
"typescript": "^5.1.3",
|
"typescript": "^5.1.3",
|
||||||
"vite": "^4.3.9",
|
"vite": "^4.3.9",
|
||||||
"yjs": "^13.6.1"
|
"yjs": "^13.6.2"
|
||||||
},
|
},
|
||||||
"version": "0.7.0-canary.17"
|
"version": "0.7.0-canary.17"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,11 +26,11 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@affine/debug": "workspace:*",
|
"@affine/debug": "workspace:*",
|
||||||
"i18next": "^22.5.0",
|
"i18next": "^22.5.1",
|
||||||
"react-i18next": "^12.3.1"
|
"react-i18next": "^12.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^18.16.16",
|
"@types/node": "^18.16.18",
|
||||||
"@types/prettier": "^2.7.3",
|
"@types/prettier": "^2.7.3",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jotai": "^2.1.1"
|
"jotai": "^2.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blocksuite/blocks": "0.0.0-20230607055421-9b20fcaf-nightly",
|
"@blocksuite/blocks": "0.0.0-20230607055421-9b20fcaf-nightly",
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
"@blocksuite/global": "0.0.0-20230607055421-9b20fcaf-nightly",
|
"@blocksuite/global": "0.0.0-20230607055421-9b20fcaf-nightly",
|
||||||
"@blocksuite/lit": "0.0.0-20230607055421-9b20fcaf-nightly",
|
"@blocksuite/lit": "0.0.0-20230607055421-9b20fcaf-nightly",
|
||||||
"@blocksuite/store": "0.0.0-20230607055421-9b20fcaf-nightly",
|
"@blocksuite/store": "0.0.0-20230607055421-9b20fcaf-nightly",
|
||||||
"lottie-web": "^5.12.0"
|
"lottie-web": "^5.12.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@blocksuite/blocks": "*",
|
"@blocksuite/blocks": "*",
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@napi-rs/cli": "^2.16.1",
|
"@napi-rs/cli": "^2.16.1",
|
||||||
"@types/node": "^18.16.16",
|
"@types/node": "^18.16.18",
|
||||||
"@types/uuid": "^9.0.1",
|
"@types/uuid": "^9.0.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
"@blocksuite/global": "0.0.0-20230607055421-9b20fcaf-nightly",
|
"@blocksuite/global": "0.0.0-20230607055421-9b20fcaf-nightly",
|
||||||
"@blocksuite/lit": "0.0.0-20230607055421-9b20fcaf-nightly",
|
"@blocksuite/lit": "0.0.0-20230607055421-9b20fcaf-nightly",
|
||||||
"@blocksuite/store": "0.0.0-20230607055421-9b20fcaf-nightly",
|
"@blocksuite/store": "0.0.0-20230607055421-9b20fcaf-nightly",
|
||||||
"jotai": "^2.1.1"
|
"jotai": "^2.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"jotai": "^2.1.1",
|
"jotai": "^2.2.0",
|
||||||
"vite": "^4.3.9",
|
"vite": "^4.3.9",
|
||||||
"vite-plugin-dts": "^2.3.0"
|
"vite-plugin-dts": "^2.3.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,23 +9,23 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@affine/component": "workspace:*",
|
"@affine/component": "workspace:*",
|
||||||
"@affine/i18n": "workspace:*",
|
"@affine/i18n": "workspace:*",
|
||||||
"@storybook/addon-actions": "^7.0.18",
|
"@storybook/addon-actions": "^7.0.20",
|
||||||
"@storybook/addon-essentials": "^7.0.18",
|
"@storybook/addon-essentials": "^7.0.20",
|
||||||
"@storybook/addon-interactions": "^7.0.18",
|
"@storybook/addon-interactions": "^7.0.20",
|
||||||
"@storybook/addon-links": "^7.0.18",
|
"@storybook/addon-links": "^7.0.20",
|
||||||
"@storybook/addon-storysource": "^7.0.18",
|
"@storybook/addon-storysource": "^7.0.20",
|
||||||
"@storybook/blocks": "^7.0.18",
|
"@storybook/blocks": "^7.0.20",
|
||||||
"@storybook/builder-vite": "^7.0.18",
|
"@storybook/builder-vite": "^7.0.20",
|
||||||
"@storybook/jest": "^0.1.0",
|
"@storybook/jest": "^0.1.0",
|
||||||
"@storybook/react": "^7.0.18",
|
"@storybook/react": "^7.0.20",
|
||||||
"@storybook/react-vite": "^7.0.18",
|
"@storybook/react-vite": "^7.0.20",
|
||||||
"@storybook/test-runner": "^0.10.0",
|
"@storybook/test-runner": "^0.10.0",
|
||||||
"@storybook/testing-library": "^0.1.0",
|
"@storybook/testing-library": "^0.1.0",
|
||||||
"@vitejs/plugin-react": "^4.0.0",
|
"@vitejs/plugin-react": "^4.0.0",
|
||||||
"concurrently": "^8.1.0",
|
"concurrently": "^8.2.0",
|
||||||
"jest-mock": "^29.5.0",
|
"jest-mock": "^29.5.0",
|
||||||
"serve": "^14.2.0",
|
"serve": "^14.2.0",
|
||||||
"storybook": "^7.0.18",
|
"storybook": "^7.0.20",
|
||||||
"storybook-dark-mode": "^3.0.0",
|
"storybook-dark-mode": "^3.0.0",
|
||||||
"wait-on": "^7.0.1"
|
"wait-on": "^7.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,19 +24,19 @@
|
|||||||
"@toeverything/hooks": "workspace:*",
|
"@toeverything/hooks": "workspace:*",
|
||||||
"@toeverything/plugin-infra": "workspace:*",
|
"@toeverything/plugin-infra": "workspace:*",
|
||||||
"@toeverything/y-indexeddb": "workspace:*",
|
"@toeverything/y-indexeddb": "workspace:*",
|
||||||
"firebase": "^9.22.1",
|
"firebase": "^9.22.2",
|
||||||
"jotai": "^2.1.1",
|
"jotai": "^2.2.0",
|
||||||
"js-base64": "^3.7.5",
|
"js-base64": "^3.7.5",
|
||||||
"ky": "^0.33.3",
|
"ky": "^0.33.3",
|
||||||
"lib0": "^0.2.78",
|
"lib0": "^0.2.78",
|
||||||
"react": "18.3.0-canary-16d053d59-20230506",
|
"react": "18.3.0-canary-16d053d59-20230506",
|
||||||
"react-dom": "18.3.0-canary-16d053d59-20230506",
|
"react-dom": "18.3.0-canary-16d053d59-20230506",
|
||||||
"y-protocols": "^1.0.5",
|
"y-protocols": "^1.0.5",
|
||||||
"yjs": "^13.6.1",
|
"yjs": "^13.6.2",
|
||||||
"zod": "^3.21.4"
|
"zod": "^3.21.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/ws": "^8.5.4",
|
"@types/ws": "^8.5.5",
|
||||||
"next": "=13.4.2",
|
"next": "=13.4.2",
|
||||||
"ws": "^8.13.0"
|
"ws": "^8.13.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@affine/component": "workspace:*",
|
"@affine/component": "workspace:*",
|
||||||
"@toeverything/plugin-infra": "workspace:*",
|
"@toeverything/plugin-infra": "workspace:*",
|
||||||
"foxact": "^0.2.7",
|
"foxact": "^0.2.8",
|
||||||
"link-preview-js": "^3.0.4"
|
"link-preview-js": "^3.0.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -9,17 +9,17 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@affine/component": "workspace:*",
|
"@affine/component": "workspace:*",
|
||||||
"@toeverything/plugin-infra": "workspace:*",
|
"@toeverything/plugin-infra": "workspace:*",
|
||||||
"langchain": "^0.0.92",
|
"langchain": "^0.0.95",
|
||||||
"marked": "^5.0.4",
|
"marked": "^5.1.0",
|
||||||
"marked-gfm-heading-id": "^3.0.4",
|
"marked-gfm-heading-id": "^3.0.4",
|
||||||
"marked-mangle": "^1.0.1"
|
"marked-mangle": "^1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/marked": "^5.0.0",
|
"@types/marked": "^5.0.0",
|
||||||
"@types/react": "^18.2.6",
|
"@types/react": "^18.2.12",
|
||||||
"@types/react-dom": "^18.2.4",
|
"@types/react-dom": "^18.2.5",
|
||||||
"idb": "^7.1.1",
|
"idb": "^7.1.1",
|
||||||
"jotai": "^2.1.1",
|
"jotai": "^2.2.0",
|
||||||
"react": "18.3.0-canary-16d053d59-20230506",
|
"react": "18.3.0-canary-16d053d59-20230506",
|
||||||
"react-dom": "18.3.0-canary-16d053d59-20230506",
|
"react-dom": "18.3.0-canary-16d053d59-20230506",
|
||||||
"zod": "^3.21.4"
|
"zod": "^3.21.4"
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {
|
|||||||
PromptTemplate,
|
PromptTemplate,
|
||||||
SystemMessagePromptTemplate,
|
SystemMessagePromptTemplate,
|
||||||
} from 'langchain/prompts';
|
} from 'langchain/prompts';
|
||||||
import { type LLMResult } from 'langchain/schema';
|
|
||||||
|
|
||||||
import { IndexedDBChatMessageHistory } from './langchain/message-history';
|
import { IndexedDBChatMessageHistory } from './langchain/message-history';
|
||||||
import { chatPrompt, followupQuestionPrompt } from './prompts';
|
import { chatPrompt, followupQuestionPrompt } from './prompts';
|
||||||
@@ -45,13 +44,7 @@ export async function createChatAI(
|
|||||||
openAIApiKey: openAIApiKey,
|
openAIApiKey: openAIApiKey,
|
||||||
callbacks: [
|
callbacks: [
|
||||||
{
|
{
|
||||||
async handleLLMStart(
|
async handleLLMStart(llm, prompts, runId, parentRunId, extraParams) {
|
||||||
llm: { name: string },
|
|
||||||
prompts: string[],
|
|
||||||
runId: string,
|
|
||||||
parentRunId?: string,
|
|
||||||
extraParams?: Record<string, unknown>
|
|
||||||
) {
|
|
||||||
console.log(
|
console.log(
|
||||||
'handleLLMStart',
|
'handleLLMStart',
|
||||||
llm,
|
llm,
|
||||||
@@ -62,21 +55,13 @@ export async function createChatAI(
|
|||||||
);
|
);
|
||||||
window.dispatchEvent(new CustomEvent('llm-start'));
|
window.dispatchEvent(new CustomEvent('llm-start'));
|
||||||
},
|
},
|
||||||
async handleLLMNewToken(
|
async handleLLMNewToken(token, runId, parentRunId) {
|
||||||
token: string,
|
|
||||||
runId: string,
|
|
||||||
parentRunId?: string
|
|
||||||
) {
|
|
||||||
console.log('handleLLMNewToken', token, runId, parentRunId);
|
console.log('handleLLMNewToken', token, runId, parentRunId);
|
||||||
window.dispatchEvent(
|
window.dispatchEvent(
|
||||||
new CustomEvent('llm-new-token', { detail: { token } })
|
new CustomEvent('llm-new-token', { detail: { token } })
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
async handleLLMEnd(
|
async handleLLMEnd(output, runId, parentRunId) {
|
||||||
output: LLMResult,
|
|
||||||
runId: string,
|
|
||||||
parentRunId?: string
|
|
||||||
) {
|
|
||||||
console.log('handleLLMEnd', output, runId, parentRunId);
|
console.log('handleLLMEnd', output, runId, parentRunId);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import type { DBSchema, IDBPDatabase } from 'idb';
|
import type { DBSchema, IDBPDatabase } from 'idb';
|
||||||
import { openDB } from 'idb';
|
import { openDB } from 'idb';
|
||||||
|
import { ChatMessageHistory } from 'langchain/memory';
|
||||||
import {
|
import {
|
||||||
AIChatMessage,
|
AIChatMessage,
|
||||||
type BaseChatMessage,
|
type BaseChatMessage,
|
||||||
BaseChatMessageHistory,
|
|
||||||
ChatMessage,
|
ChatMessage,
|
||||||
HumanChatMessage,
|
HumanChatMessage,
|
||||||
type StoredMessage,
|
type StoredMessage,
|
||||||
@@ -38,9 +38,9 @@ interface ChatMessageDBV2 extends ChatMessageDBV1 {
|
|||||||
|
|
||||||
export const conversationHistoryDBName = 'affine-copilot-chat';
|
export const conversationHistoryDBName = 'affine-copilot-chat';
|
||||||
|
|
||||||
export class IndexedDBChatMessageHistory extends BaseChatMessageHistory {
|
export class IndexedDBChatMessageHistory extends ChatMessageHistory {
|
||||||
public id: string;
|
public id: string;
|
||||||
private messages: BaseChatMessage[] = [];
|
private chatMessages: BaseChatMessage[] = [];
|
||||||
|
|
||||||
private readonly dbPromise: Promise<IDBPDatabase<ChatMessageDBV2>>;
|
private readonly dbPromise: Promise<IDBPDatabase<ChatMessageDBV2>>;
|
||||||
private readonly initPromise: Promise<void>;
|
private readonly initPromise: Promise<void>;
|
||||||
@@ -48,7 +48,7 @@ export class IndexedDBChatMessageHistory extends BaseChatMessageHistory {
|
|||||||
constructor(id: string) {
|
constructor(id: string) {
|
||||||
super();
|
super();
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.messages = [];
|
this.chatMessages = [];
|
||||||
this.dbPromise = openDB<ChatMessageDBV2>('affine-copilot-chat', 2, {
|
this.dbPromise = openDB<ChatMessageDBV2>('affine-copilot-chat', 2, {
|
||||||
upgrade(database, oldVersion) {
|
upgrade(database, oldVersion) {
|
||||||
if (oldVersion === 0) {
|
if (oldVersion === 0) {
|
||||||
@@ -68,7 +68,7 @@ export class IndexedDBChatMessageHistory extends BaseChatMessageHistory {
|
|||||||
.objectStore('chat');
|
.objectStore('chat');
|
||||||
const chat = await objectStore.get(id);
|
const chat = await objectStore.get(id);
|
||||||
if (chat != null) {
|
if (chat != null) {
|
||||||
this.messages = chat.messages.map(message => {
|
this.chatMessages = chat.messages.map(message => {
|
||||||
switch (message.type) {
|
switch (message.type) {
|
||||||
case 'ai':
|
case 'ai':
|
||||||
return new AIChatMessage(message.data.content);
|
return new AIChatMessage(message.data.content);
|
||||||
@@ -112,9 +112,9 @@ export class IndexedDBChatMessageHistory extends BaseChatMessageHistory {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async addMessage(message: BaseChatMessage): Promise<void> {
|
override async addMessage(message: BaseChatMessage): Promise<void> {
|
||||||
await this.initPromise;
|
await this.initPromise;
|
||||||
this.messages.push(message);
|
this.chatMessages.push(message);
|
||||||
const db = await this.dbPromise;
|
const db = await this.dbPromise;
|
||||||
const objectStore = db.transaction('chat', 'readwrite').objectStore('chat');
|
const objectStore = db.transaction('chat', 'readwrite').objectStore('chat');
|
||||||
const chat = await objectStore.get(this.id);
|
const chat = await objectStore.get(this.id);
|
||||||
@@ -129,23 +129,23 @@ export class IndexedDBChatMessageHistory extends BaseChatMessageHistory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async addAIChatMessage(message: string): Promise<void> {
|
override async addAIChatMessage(message: string): Promise<void> {
|
||||||
await this.addMessage(new AIChatMessage(message));
|
await this.addMessage(new AIChatMessage(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
async addUserMessage(message: string): Promise<void> {
|
override async addUserMessage(message: string): Promise<void> {
|
||||||
await this.addMessage(new HumanChatMessage(message));
|
await this.addMessage(new HumanChatMessage(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
async clear(): Promise<void> {
|
override async clear(): Promise<void> {
|
||||||
await this.initPromise;
|
await this.initPromise;
|
||||||
this.messages = [];
|
this.chatMessages = [];
|
||||||
const db = await this.dbPromise;
|
const db = await this.dbPromise;
|
||||||
const objectStore = db.transaction('chat', 'readwrite').objectStore('chat');
|
const objectStore = db.transaction('chat', 'readwrite').objectStore('chat');
|
||||||
await objectStore.delete(this.id);
|
await objectStore.delete(this.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMessages(): Promise<BaseChatMessage[]> {
|
override async getMessages(): Promise<BaseChatMessage[]> {
|
||||||
return this.initPromise.then(() => this.messages);
|
return this.initPromise.then(() => this.chatMessages);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user