donteatfriedrice
2024-08-07 06:55:51 +00:00
parent ae9381c36d
commit f35dc744dd
2 changed files with 14 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
export * from './blocksuite-editor';
import './ai/setup-provider';
import './specs/preview';

View File

@@ -0,0 +1,13 @@
import type { BlockSpec } from '@blocksuite/block-std';
import { SpecProvider } from '@blocksuite/blocks';
import { AIChatBlockSpec, EdgelessAIChatBlockSpec } from '@blocksuite/presets';
const CustomSpecs: BlockSpec[] = [AIChatBlockSpec, EdgelessAIChatBlockSpec];
function patchPreviewSpec(id: string, specs: BlockSpec[]) {
const specProvider = SpecProvider.getInstance();
specProvider.extendSpec(id, specs);
}
// Patch edgeless preview spec for blocksuite surface-ref and embed-synced-doc
patchPreviewSpec('edgeless:preview', CustomSpecs);