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

This commit is contained in:
donteatfriedrice
2025-02-27 08:54:15 +00:00
parent d57ef5c5b3
commit 272d41e32d
2 changed files with 3 additions and 13 deletions
@@ -6,16 +6,12 @@ import {
ShadowlessElement, ShadowlessElement,
} from '@blocksuite/affine/block-std'; } from '@blocksuite/affine/block-std';
import { import {
CodeBlockComponent,
codeBlockWrapMiddleware, codeBlockWrapMiddleware,
defaultBlockMarkdownAdapterMatchers, defaultBlockMarkdownAdapterMatchers,
defaultImageProxyMiddleware, defaultImageProxyMiddleware,
DividerBlockComponent,
InlineDeltaToMarkdownAdapterExtensions, InlineDeltaToMarkdownAdapterExtensions,
ListBlockComponent,
MarkdownInlineToDeltaAdapterExtensions, MarkdownInlineToDeltaAdapterExtensions,
PageEditorBlockSpecs, PageEditorBlockSpecs,
ParagraphBlockComponent,
} from '@blocksuite/affine/blocks'; } from '@blocksuite/affine/blocks';
import { Container, type ServiceProvider } from '@blocksuite/affine/global/di'; import { Container, type ServiceProvider } from '@blocksuite/affine/global/di';
import { WithDisposable } from '@blocksuite/affine/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
@@ -39,13 +35,6 @@ import type {
AffineAIPanelWidgetConfig, AffineAIPanelWidgetConfig,
} from '../widgets/ai-panel/type'; } from '../widgets/ai-panel/type';
const textBlockStyles = css`
${ParagraphBlockComponent.styles}
${ListBlockComponent.styles}
${DividerBlockComponent.styles}
${CodeBlockComponent.styles}
`;
const customHeadingStyles = css` const customHeadingStyles = css`
.custom-heading { .custom-heading {
.h1 { .h1 {
@@ -178,7 +167,6 @@ export class TextRenderer extends WithDisposable(ShadowlessElement) {
} }
} }
${textBlockStyles}
${customHeadingStyles} ${customHeadingStyles}
`; `;
@@ -110,7 +110,9 @@ const collectChat = async (page: Page) => {
return []; return [];
} }
// wait ai response // 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); await page.waitForTimeout(200);
const lastMessage = await chatPanel.$$('.message').then(m => m[m.length - 1]); const lastMessage = await chatPanel.$$('.message').then(m => m[m.length - 1]);
await lastMessage.waitForSelector('chat-copy-more'); await lastMessage.waitForSelector('chat-copy-more');