-
- ${isEmbedding
- ? html`Embedding ${done}/${total}`
- : 'AFFiNE AI'}
-
- ${this.playgroundConfig.visible.value
- ? html`
-
- ${CenterPeekIcon()}
-
- `
- : nothing}
-
-
- `;
- }
-}
diff --git a/packages/frontend/core/src/blocksuite/ai/chat-panel/index.ts b/packages/frontend/core/src/blocksuite/ai/chat-panel/index.ts
deleted file mode 100644
index beaf6c9b56..0000000000
--- a/packages/frontend/core/src/blocksuite/ai/chat-panel/index.ts
+++ /dev/null
@@ -1,485 +0,0 @@
-import type {
- AIDraftService,
- AIToolsConfigService,
-} from '@affine/core/modules/ai-button';
-import type { AIModelService } from '@affine/core/modules/ai-button/services/models';
-import type {
- ServerService,
- SubscriptionService,
-} from '@affine/core/modules/cloud';
-import type { WorkspaceDialogService } from '@affine/core/modules/dialogs';
-import type { FeatureFlagService } from '@affine/core/modules/feature-flag';
-import type { PeekViewService } from '@affine/core/modules/peek-view';
-import type { AppThemeService } from '@affine/core/modules/theme';
-import type { WorkbenchService } from '@affine/core/modules/workbench';
-import type {
- ContextEmbedStatus,
- CopilotChatHistoryFragment,
- UpdateChatSessionInput,
-} from '@affine/graphql';
-import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
-import { type NotificationService } from '@blocksuite/affine/shared/services';
-import type { EditorHost } from '@blocksuite/affine/std';
-import { ShadowlessElement } from '@blocksuite/affine/std';
-import type { ExtensionType, Store } from '@blocksuite/affine/store';
-import { type Signal, signal } from '@preact/signals-core';
-import { css, html, type PropertyValues } from 'lit';
-import { property, state } from 'lit/decorators.js';
-import { keyed } from 'lit/directives/keyed.js';
-
-import { AffineIcon } from '../_common/icons';
-import type { SearchMenuConfig } from '../components/ai-chat-add-context';
-import type { DocDisplayConfig } from '../components/ai-chat-chips';
-import type { ChatContextValue } from '../components/ai-chat-content';
-import type {
- AIPlaygroundConfig,
- AIReasoningConfig,
-} from '../components/ai-chat-input';
-import type { ChatStatus } from '../components/ai-chat-messages';
-import { AIProvider } from '../provider';
-import type { AppSidebarConfig } from './chat-config';
-
-export class ChatPanel extends SignalWatcher(
- WithDisposable(ShadowlessElement)
-) {
- static override styles = css`
- chat-panel {
- width: 100%;
- user-select: text;
-
- .chat-panel-container {
- height: 100%;
- display: flex;
- flex-direction: column;
- }
-
- ai-chat-content {
- height: 0;
- flex-grow: 1;
- }
-
- .chat-loading-container {
- position: relative;
- padding: 44px 0 166px 0;
- height: 100%;
- display: flex;
- align-items: center;
- }
-
- .chat-loading {
- width: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 12px;
- }
-
- .chat-loading-title {
- font-weight: 600;
- font-size: var(--affine-font-sm);
- color: var(--affine-text-secondary-color);
- }
- }
- `;
-
- @property({ attribute: false })
- accessor host!: EditorHost;
-
- @property({ attribute: false })
- accessor doc!: Store;
-
- @property({ attribute: false })
- accessor playgroundConfig!: AIPlaygroundConfig;
-
- @property({ attribute: false })
- accessor appSidebarConfig!: AppSidebarConfig;
-
- @property({ attribute: false })
- accessor reasoningConfig!: AIReasoningConfig;
-
- @property({ attribute: false })
- accessor searchMenuConfig!: SearchMenuConfig;
-
- @property({ attribute: false })
- accessor docDisplayConfig!: DocDisplayConfig;
-
- @property({ attribute: false })
- accessor extensions!: ExtensionType[];
-
- @property({ attribute: false })
- accessor serverService!: ServerService;
-
- @property({ attribute: false })
- accessor affineFeatureFlagService!: FeatureFlagService;
-
- @property({ attribute: false })
- accessor affineWorkspaceDialogService!: WorkspaceDialogService;
-
- @property({ attribute: false })
- accessor affineWorkbenchService!: WorkbenchService;
-
- @property({ attribute: false })
- accessor affineThemeService!: AppThemeService;
-
- @property({ attribute: false })
- accessor notificationService!: NotificationService;
-
- @property({ attribute: false })
- accessor aiDraftService!: AIDraftService;
-
- @property({ attribute: false })
- accessor aiToolsConfigService!: AIToolsConfigService;
-
- @property({ attribute: false })
- accessor peekViewService!: PeekViewService;
-
- @property({ attribute: false })
- accessor subscriptionService!: SubscriptionService;
-
- @property({ attribute: false })
- accessor aiModelService!: AIModelService;
-
- @property({ attribute: false })
- accessor onAISubscribe!: () => Promise