mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-14 16:46:22 +08:00
chore: remove unused component imports and styles from text-renderer (#10478)
This commit is contained in:
@@ -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}
|
||||
`;
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user