mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 19:46:32 +08:00
feat: bump blocksuite (#6852)
## Features - https://github.com/toeverything/BlockSuite/pull/6995 @fundon ## Bugfix - https://github.com/toeverything/BlockSuite/pull/7002 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/7000 @regischen - https://github.com/toeverything/BlockSuite/pull/7001 @fundon - https://github.com/toeverything/BlockSuite/pull/6999 @Flrande - https://github.com/toeverything/BlockSuite/pull/6997 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6996 @regischen - https://github.com/toeverything/BlockSuite/pull/6994 @L-Sun ## Refactor ## Misc
This commit is contained in:
@@ -19,9 +19,14 @@ const EditorChatPanel = ({ editor }: SidebarTabProps) => {
|
||||
|
||||
useEffect(() => {
|
||||
if (!editor) return;
|
||||
editor.host.spec.getService('affine:page').slots.docLinkClicked.on(() => {
|
||||
const pageService = editor.host.spec.getService('affine:page');
|
||||
|
||||
pageService.slots.docLinkClicked.on(() => {
|
||||
(chatPanelRef.current as ChatPanel).doc = editor.doc;
|
||||
});
|
||||
pageService.slots.editorModeSwitch.on(() => {
|
||||
(chatPanelRef.current as ChatPanel).host = editor.host;
|
||||
});
|
||||
}, [editor]);
|
||||
|
||||
if (!editor) {
|
||||
@@ -32,11 +37,9 @@ const EditorChatPanel = ({ editor }: SidebarTabProps) => {
|
||||
chatPanelRef.current = new ChatPanel();
|
||||
}
|
||||
|
||||
if (editor !== chatPanelRef.current?.editor) {
|
||||
(chatPanelRef.current as ChatPanel).editor = editor;
|
||||
(chatPanelRef.current as ChatPanel).doc = editor.doc;
|
||||
// (copilotPanelRef.current as CopilotPanel).fitPadding = [20, 20, 20, 20];
|
||||
}
|
||||
(chatPanelRef.current as ChatPanel).host = editor.host;
|
||||
(chatPanelRef.current as ChatPanel).doc = editor.doc;
|
||||
// (copilotPanelRef.current as CopilotPanel).fitPadding = [20, 20, 20, 20];
|
||||
|
||||
return <div className={styles.root} ref={onRefChange} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user