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.

chore: remove unused component imports and styles from text-renderer (#10478)

donteatfriedrice272d41e32dcc
diff --git a/packages/frontend/core/src/blocksuite/ai/components/text-renderer.ts b/packages/frontend/core/src/blocksuite/ai/components/text-renderer.ts
index 6fbc926115..7ea103dd93 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/text-renderer.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/text-renderer.ts
@@ -6,16 +6,12 @@ import {
ShadowlessElement,
} from '@blocksuite/affine/block-std';
import {
- CodeBlockComponent,
codeBlockWrapMiddleware,
defaultBlockMarkdownAdapterMatchers,
defaultImageProxyMiddleware,
- DividerBlockComponent,
InlineDeltaToMarkdownAdapterExtensions,
- ListBlockComponent,
MarkdownInlineToDeltaAdapterExtensions,
PageEditorBlockSpecs,
- ParagraphBlockComponent,
} from '@blocksuite/affine/blocks';
import { Container, type ServiceProvider } from '@blocksuite/affine/global/di';
import { WithDisposable } from '@blocksuite/affine/global/utils';
@@ -39,13 +35,6 @@ import type {
AffineAIPanelWidgetConfig,
} from '../widgets/ai-panel/type';
-const textBlockStyles = css`
- ${ParagraphBlockComponent.styles}
- ${ListBlockComponent.styles}
- ${DividerBlockComponent.styles}
- ${CodeBlockComponent.styles}
-`;
-
const customHeadingStyles = css`
.custom-heading {
.h1 {
@@ -178,7 +167,6 @@ export class TextRenderer extends WithDisposable(ShadowlessElement) {
}
}
- ${textBlockStyles}
${customHeadingStyles}
`;
diff --git a/tests/affine-cloud-copilot/e2e/copilot.spec.ts b/tests/affine-cloud-copilot/e2e/copilot.spec.ts
index acbc9e0427..51cfffde9a 100644
--- a/tests/affine-cloud-copilot/e2e/copilot.spec.ts
+++ b/tests/affine-cloud-copilot/e2e/copilot.spec.ts
@@ -110,7 +110,9 @@ const collectChat = async (page: Page) => {
return [];
}
// wait ai response
- await page.waitForSelector('.chat-panel-messages .message chat-copy-more');
+ await page.waitForSelector('.chat-panel-messages .message chat-copy-more', {
+ timeout: ONE_MINUTE,
+ });
await page.waitForTimeout(200);
const lastMessage = await chatPanel.$$('.message').then(m => m[m.length - 1]);
await lastMessage.waitForSelector('chat-copy-more');