Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 11 changed files with 833 additions and 266 deletions.
4 changes: 2 additions & 2 deletions packages/common/env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"private": true,
"type": "module",
"devDependencies": {
"@blocksuite/global": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/store": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/global": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/store": "0.14.0-canary-202404111515-fb8a834",
"react": "18.2.0",
"react-dom": "18.2.0",
"vitest": "1.4.0"
Expand Down
14 changes: 7 additions & 7 deletions packages/common/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"@affine/debug": "workspace:*",
"@affine/env": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/blocks": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/global": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/store": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/blocks": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/global": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/store": "0.14.0-canary-202404111515-fb8a834",
"@datastructures-js/binary-search-tree": "^5.3.2",
"foxact": "^0.2.33",
"jotai": "^2.8.0",
Expand All @@ -28,10 +28,10 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/block-std": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/presets": "0.14.0-canary-202404090831-25c5310",
"@testing-library/react": "^15.0.0",
"async-call-rpc": "^6.4.2",
"@blocksuite/block-std": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/presets": "0.14.0-canary-202404111515-fb8a834",
"@testing-library/react": "^14.2.1",
"async-call-rpc": "^6.4.0",
"react": "^18.2.0",
"rxjs": "^7.8.1",
"vite": "^5.2.8",
Expand Down
6 changes: 3 additions & 3 deletions packages/common/y-indexeddb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
}
},
"dependencies": {
"@blocksuite/global": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/global": "0.14.0-canary-202404111515-fb8a834",
"idb": "^8.0.0",
"nanoid": "^5.0.7",
"y-provider": "workspace:*"
},
"devDependencies": {
"@blocksuite/blocks": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/store": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/blocks": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/store": "0.14.0-canary-202404111515-fb8a834",
"fake-indexeddb": "^5.0.2",
"vite": "^5.2.8",
"vite-plugin-dts": "3.8.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/common/y-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"build": "vite build"
},
"devDependencies": {
"@blocksuite/store": "0.14.0-canary-202404090831-25c5310",
"vite": "^5.2.8",
"vite-plugin-dts": "3.8.1",
"@blocksuite/store": "0.14.0-canary-202404111515-fb8a834",
"vite": "^5.1.4",
"vite-plugin-dts": "3.7.3",
"vitest": "1.4.0",
"yjs": "^13.6.14"
},
Expand Down
10 changes: 5 additions & 5 deletions packages/frontend/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@blocksuite/block-std": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/blocks": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/global": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/block-std": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/blocks": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/global": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/icons": "2.1.46",
"@blocksuite/presets": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/store": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/presets": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/store": "0.14.0-canary-202404111515-fb8a834",
"@storybook/addon-actions": "^7.6.17",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-interactions": "^7.6.17",
Expand Down
12 changes: 6 additions & 6 deletions packages/frontend/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"@affine/i18n": "workspace:*",
"@affine/templates": "workspace:*",
"@affine/workspace-impl": "workspace:*",
"@blocksuite/block-std": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/blocks": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/global": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/block-std": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/blocks": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/global": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/icons": "2.1.46",
"@blocksuite/inline": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/presets": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/store": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/inline": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/presets": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/store": "0.14.0-canary-202404111515-fb8a834",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^7.0.0",
"@dnd-kit/sortable": "^8.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
import { useWorkspaceEnabledFeatures } from '@affine/core/hooks/use-workspace-features';
import { FeatureType } from '@affine/graphql';
import { assertExists } from '@blocksuite/global/utils';
import { AiIcon } from '@blocksuite/icons';
import { ChatPanel } from '@blocksuite/presets';
import { useService, Workspace } from '@toeverything/infra';
import { useCallback, useRef } from 'react';

import type { SidebarTab, SidebarTabProps } from '../sidebar-tab';
import * as styles from './chat.css';

// A wrapper for CopilotPanel
const EditorChatPanel = ({ editor }: SidebarTabProps) => {
const workspace = useService(Workspace);
const copilotEnabled = useWorkspaceEnabledFeatures(workspace.meta).includes(
FeatureType.Copilot
);
const chatPanelRef = useRef<ChatPanel | null>(null);

const onRefChange = useCallback((container: HTMLDivElement | null) => {
if (container) {
assertExists(chatPanelRef.current, 'chat panel should be initialized');
container.append(chatPanelRef.current);
}
}, []);
const onRefChange = useCallback(
(container: HTMLDivElement | null) => {
if (container && copilotEnabled) {
assertExists(chatPanelRef.current, 'chat panel should be initialized');
container.append(chatPanelRef.current);
}
},
[copilotEnabled]
);

if (!editor) {
return;
Expand Down
26 changes: 13 additions & 13 deletions packages/frontend/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@
"@affine/env": "workspace:*",
"@affine/i18n": "workspace:*",
"@affine/native": "workspace:*",
"@blocksuite/block-std": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/blocks": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/presets": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/store": "0.14.0-canary-202404090831-25c5310",
"@electron-forge/cli": "^7.3.1",
"@electron-forge/core": "^7.3.1",
"@electron-forge/core-utils": "^7.3.1",
"@electron-forge/maker-deb": "^7.3.1",
"@electron-forge/maker-dmg": "^7.3.1",
"@electron-forge/maker-squirrel": "^7.3.1",
"@electron-forge/maker-zip": "^7.3.1",
"@electron-forge/plugin-auto-unpack-natives": "^7.3.1",
"@electron-forge/shared-types": "^7.3.1",
"@blocksuite/block-std": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/blocks": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/presets": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/store": "0.14.0-canary-202404111515-fb8a834",
"@electron-forge/cli": "^7.3.0",
"@electron-forge/core": "^7.3.0",
"@electron-forge/core-utils": "^7.3.0",
"@electron-forge/maker-deb": "^7.3.0",
"@electron-forge/maker-dmg": "^7.3.0",
"@electron-forge/maker-squirrel": "^7.3.0",
"@electron-forge/maker-zip": "^7.3.0",
"@electron-forge/plugin-auto-unpack-natives": "^7.3.0",
"@electron-forge/shared-types": "^7.3.0",
"@emotion/react": "^11.11.4",
"@pengx17/electron-forge-maker-appimage": "^1.2.0",
"@sentry/electron": "^4.22.0",
Expand Down
12 changes: 6 additions & 6 deletions tests/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"storybook-addon-react-router-v6": "^2.0.15"
},
"devDependencies": {
"@blocksuite/block-std": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/blocks": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/global": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/block-std": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/blocks": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/global": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/icons": "2.1.46",
"@blocksuite/inline": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/presets": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/store": "0.14.0-canary-202404090831-25c5310",
"@blocksuite/inline": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/presets": "0.14.0-canary-202404111515-fb8a834",
"@blocksuite/store": "0.14.0-canary-202404111515-fb8a834",
"@storybook/addon-actions": "^7.6.17",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-interactions": "^7.6.17",
Expand Down
4 changes: 2 additions & 2 deletions tools/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"devDependencies": {
"@affine/env": "workspace:*",
"@affine/templates": "workspace:*",
"@aws-sdk/client-s3": "3.552.0",
"@blocksuite/presets": "0.14.0-canary-202404090831-25c5310",
"@aws-sdk/client-s3": "3.537.0",
"@blocksuite/presets": "0.14.0-canary-202404111515-fb8a834",
"@clack/core": "^0.3.4",
"@clack/prompts": "^0.7.0",
"@magic-works/i18n-codegen": "^0.5.0",
Expand Down

0 comments on commit 1697cd7

Please sign in to comment.