Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): plugin (#3307)

Alex Yang8e9535dd2706
diff --git a/apps/core/package.json b/apps/core/package.json
index 864cc413e3..9207aca1c0 100644
--- a/apps/core/package.json
+++ b/apps/core/package.json
@@ -12,6 +12,7 @@
"@affine-test/fixtures": "workspace:*",
"@affine/bookmark-block": "workspace:*",
"@affine/component": "workspace:*",
+ "@affine/copilot": "workspace:*",
"@affine/debug": "workspace:*",
"@affine/env": "workspace:*",
"@affine/graphql": "workspace:*",
diff --git a/apps/core/src/bootstrap/register-plugins.ts b/apps/core/src/bootstrap/register-plugins.ts
index 4b6da39c2e..fe7b54f107 100644
--- a/apps/core/src/bootstrap/register-plugins.ts
+++ b/apps/core/src/bootstrap/register-plugins.ts
@@ -1,3 +1,6 @@
import('@affine/bookmark-block');
+if (runtimeConfig.enablePlugin) {
+ import('@affine/copilot');
+}
export {};
diff --git a/apps/core/tsconfig.json b/apps/core/tsconfig.json
index 410c0da283..1df4ba0cb9 100644
--- a/apps/core/tsconfig.json
+++ b/apps/core/tsconfig.json
@@ -45,6 +45,14 @@
{
"path": "../../packages/workspace"
},
+
+ {
+ "path": "../../plugins/bookmark-block"
+ },
+ {
+ "path": "../../plugins/copilot"
+ },
+
{
"path": "./tsconfig.node.json"
},
diff --git a/packages/jotai/package.json b/packages/jotai/package.json
index b819d13318..46d5f235ad 100644
--- a/packages/jotai/package.json
+++ b/packages/jotai/package.json
@@ -6,6 +6,7 @@
"jotai": "^2.2.2"
},
"devDependencies": {
+ "@blocksuite/block-std": "0.0.0-20230718155514-65ea63b4-nightly",
"@blocksuite/blocks": "0.0.0-20230718155514-65ea63b4-nightly",
"@blocksuite/editor": "0.0.0-20230718155514-65ea63b4-nightly",
"@blocksuite/global": "0.0.0-20230718155514-65ea63b4-nightly",
@@ -14,6 +15,7 @@
"lottie-web": "^5.12.2"
},
"peerDependencies": {
+ "@blocksuite/block-std": "*",
"@blocksuite/blocks": "*",
"@blocksuite/editor": "*",
"@blocksuite/global": "*",
diff --git a/yarn.lock b/yarn.lock
index a13a43794f..9afc62ab24 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -158,7 +158,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@affine/copilot@workspace:plugins/copilot":
+"@affine/copilot@workspace:*, @affine/copilot@workspace:plugins/copilot":
version: 0.0.0-use.local
resolution: "@affine/copilot@workspace:plugins/copilot"
dependencies:
@@ -189,6 +189,7 @@ __metadata:
"@affine-test/fixtures": "workspace:*"
"@affine/bookmark-block": "workspace:*"
"@affine/component": "workspace:*"
+ "@affine/copilot": "workspace:*"
"@affine/debug": "workspace:*"
"@affine/env": "workspace:*"
"@affine/graphql": "workspace:*"
@@ -389,6 +390,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@affine/jotai@workspace:packages/jotai"
dependencies:
+ "@blocksuite/block-std": 0.0.0-20230718155514-65ea63b4-nightly
"@blocksuite/blocks": 0.0.0-20230718155514-65ea63b4-nightly
"@blocksuite/editor": 0.0.0-20230718155514-65ea63b4-nightly
"@blocksuite/global": 0.0.0-20230718155514-65ea63b4-nightly
@@ -397,6 +399,7 @@ __metadata:
jotai: ^2.2.2
lottie-web: ^5.12.2
peerDependencies:
+ "@blocksuite/block-std": "*"
"@blocksuite/blocks": "*"
"@blocksuite/editor": "*"
"@blocksuite/global": "*"