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.

fix(core): ai lit element import (#7257)

L-Sun501fa0bb9118
diff --git a/packages/frontend/core/package.json b/packages/frontend/core/package.json
index 8ee336011f..c26a59a755 100644
--- a/packages/frontend/core/package.json
+++ b/packages/frontend/core/package.json
@@ -11,7 +11,10 @@
"./*": "./src/*"
},
"sideEffects": [
- "./src/**/*.css"
+ "./src/**/*.css",
+ "./src/blocksuite/**/*.ts",
+ "./src/components/blocksuite/**/*.ts",
+ "./src/components/blocksuite/**/*.tsx"
],
"dependencies": {
"@affine-test/fixtures": "workspace:*",
@@ -115,4 +118,4 @@
"mime-types": "^2.1.35",
"vitest": "1.6.0"
}
-}
\ No newline at end of file
+}
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-button.ts b/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-button.ts
index 22f35a6444..a119344088 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-button.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-button.ts
@@ -1,4 +1,4 @@
-import './ask-ai-panel.js';
+import './ask-ai-panel';
import { type EditorHost, WithDisposable } from '@blocksuite/block-std';
import {
@@ -14,7 +14,7 @@ import { customElement, property, query } from 'lit/decorators.js';
import { ref } from 'lit/directives/ref.js';
import { styleMap } from 'lit/directives/style-map.js';
-import { getRootService } from '../../utils/selection-utils.js';
+import { getRootService } from '../../utils/selection-utils';
type buttonSize = 'small' | 'middle' | 'large';
type toggleType = 'hover' | 'click';
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-panel.ts b/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-panel.ts
index 17421c8e4e..0626c07c4a 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-panel.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-panel.ts
@@ -7,7 +7,7 @@ import { css, html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
-import { getRootService } from '../../utils/selection-utils.js';
+import { getRootService } from '../../utils/selection-utils';
@customElement('ask-ai-panel')
export class AskAIPanel extends WithDisposable(LitElement) {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/_common/config.ts b/packages/frontend/core/src/blocksuite/presets/ai/_common/config.ts
index 0da117dd3b..f2b7d4f8e9 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/_common/config.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/_common/config.ts
@@ -9,21 +9,21 @@ import {
} from '@blocksuite/blocks';
import type { TemplateResult } from 'lit';
-import { actionToHandler } from '../actions/doc-handler.js';
-import { actionToHandler as edgelessActionToHandler } from '../actions/edgeless-handler.js';
+import { actionToHandler } from '../actions/doc-handler';
+import { actionToHandler as edgelessActionToHandler } from '../actions/edgeless-handler';
import {
imageFilterStyles,
imageProcessingTypes,
textTones,
translateLangs,
-} from '../actions/types.js';
-import { getAIPanel } from '../ai-panel.js';
-import { AIProvider } from '../provider.js';
+} from '../actions/types';
+import { getAIPanel } from '../ai-panel';
+import { AIProvider } from '../provider';
import {
getSelectedImagesAsBlobs,
getSelectedTextContent,
getSelections,
-} from '../utils/selection-utils.js';
+} from '../utils/selection-utils';
import {
AIDoneIcon,
AIImageIcon,
@@ -45,7 +45,7 @@ import {
SelectionIcon,
ShorterIcon,
ToneIcon,
-} from './icons.js';
+} from './icons';
export const translateSubItem: AISubItemConfig[] = translateLangs.map(lang => {
return {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/_common/selection-utils.ts b/packages/frontend/core/src/blocksuite/presets/ai/_common/selection-utils.ts
index 66eddaf539..4227b906c9 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/_common/selection-utils.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/_common/selection-utils.ts
@@ -9,7 +9,7 @@ import {
import { assertExists } from '@blocksuite/global/utils';
import { Slice } from '@blocksuite/store';
-import { getMarkdownFromSlice } from './markdown-utils.js';
+import { getMarkdownFromSlice } from './markdown-utils';
export const getRootService = (host: EditorHost) => {
return host.std.spec.getService('affine:page');
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/actions/doc-handler.ts b/packages/frontend/core/src/blocksuite/presets/ai/actions/doc-handler.ts
index 215dd3648e..fae4636f77 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/actions/doc-handler.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/actions/doc-handler.ts
@@ -13,16 +13,16 @@ import {
buildFinishConfig,
buildGeneratingConfig,
getAIPanel,
-} from '../ai-panel.js';
-import { createTextRenderer } from '../messages/text.js';
-import { AIProvider } from '../provider.js';
-import { reportResponse } from '../utils/action-reporter.js';
+} from '../ai-panel';
+import { createTextRenderer } from '../messages/text';
+import { AIProvider } from '../provider';
+import { reportResponse } from '../utils/action-reporter';
import {
getSelectedImagesAsBlobs,
getSelectedTextContent,
getSelections,
selectAboveBlocks,
-} from '../utils/selection-utils.js';
+} from '../utils/selection-utils';
export function bindTextStream(
stream: BlockSuitePresets.TextStream,
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-handler.ts b/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-handler.ts
index 96078de6eb..83a6239001 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-handler.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-handler.ts
@@ -17,41 +17,38 @@ import { assertExists } from '@blocksuite/global/utils';
import { Slice } from '@blocksuite/store';
import type { TemplateResult } from 'lit';
-import { getAIPanel } from '../ai-panel.js';
+import { getAIPanel } from '../ai-panel';
import {
createMindmapExecuteRenderer,
createMindmapRenderer,
-} from '../messages/mindmap.js';
-import { createSlidesRenderer } from '../messages/slides-renderer.js';
-import { createTextRenderer } from '../messages/text.js';
-import {
- createIframeRenderer,
- createImageRenderer,
-} from '../messages/wrapper.js';
-import { AIProvider } from '../provider.js';
-import { reportResponse } from '../utils/action-reporter.js';
+} from '../messages/mindmap';
+import { createSlidesRenderer } from '../messages/slides-renderer';
+import { createTextRenderer } from '../messages/text';
+import { createIframeRenderer, createImageRenderer } from '../messages/wrapper';
+import { AIProvider } from '../provider';
+import { reportResponse } from '../utils/action-reporter';
import {
getEdgelessCopilotWidget,
isMindmapChild,
isMindMapRoot,
-} from '../utils/edgeless.js';
-import { copyTextAnswer } from '../utils/editor-actions.js';
-import { getContentFromSlice } from '../utils/markdown-utils.js';
+} from '../utils/edgeless';
+import { copyTextAnswer } from '../utils/editor-actions';
+import { getContentFromSlice } from '../utils/markdown-utils';
import {
getCopilotSelectedElems,
getSelectedNoteAnchor,
getSelections,
-} from '../utils/selection-utils.js';
-import { EXCLUDING_COPY_ACTIONS, IMAGE_ACTIONS } from './consts.js';
-import { bindTextStream } from './doc-handler.js';
+} from '../utils/selection-utils';
+import { EXCLUDING_COPY_ACTIONS, IMAGE_ACTIONS } from './consts';
+import { bindTextStream } from './doc-handler';
import {
actionToErrorResponse,
actionToGenerating,
actionToResponse,
getElementToolbar,
responses,
-} from './edgeless-response.js';
-import type { CtxRecord } from './types.js';
+} from './edgeless-response';
+import type { CtxRecord } from './types';
type AnswerRenderer = NonNullable<
AffineAIPanelWidget['config']
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-response.ts b/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-response.ts
index ab2d809687..5962008837 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-response.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-response.ts
@@ -22,26 +22,26 @@ import {
import { assertExists } from '@blocksuite/global/utils';
import type { TemplateResult } from 'lit';
-import { AIPenIcon, ChatWithAIIcon } from '../_common/icons.js';
-import { insertFromMarkdown } from '../_common/markdown-utils.js';
-import { getSurfaceElementFromEditor } from '../_common/selection-utils.js';
-import { getAIPanel } from '../ai-panel.js';
-import { AIProvider } from '../provider.js';
-import { reportResponse } from '../utils/action-reporter.js';
+import { AIPenIcon, ChatWithAIIcon } from '../_common/icons';
+import { insertFromMarkdown } from '../_common/markdown-utils';
+import { getSurfaceElementFromEditor } from '../_common/selection-utils';
+import { getAIPanel } from '../ai-panel';
+import { AIProvider } from '../provider';
+import { reportResponse } from '../utils/action-reporter';
import {
getEdgelessCopilotWidget,
getService,
isMindMapRoot,
-} from '../utils/edgeless.js';
-import { preprocessHtml } from '../utils/html.js';
-import { fetchImageToFile } from '../utils/image.js';
+} from '../utils/edgeless';
+import { preprocessHtml } from '../utils/html';
+import { fetchImageToFile } from '../utils/image';
import {
getCopilotSelectedElems,
getEdgelessRootFromEditor,
getEdgelessService,
-} from '../utils/selection-utils.js';
-import { EXCLUDING_INSERT_ACTIONS, generatingStages } from './consts.js';
-import type { CtxRecord } from './types.js';
+} from '../utils/selection-utils';
+import { EXCLUDING_INSERT_ACTIONS, generatingStages } from './consts';
+import type { CtxRecord } from './types';
type FinishConfig = Exclude<
AffineAIPanelWidget['config'],
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/actions/index.ts b/packages/frontend/core/src/blocksuite/presets/ai/actions/index.ts
index 2c2fa246fd..b9c291f336 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/actions/index.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/actions/index.ts
@@ -1,2 +1,2 @@
-export * from './doc-handler.js';
-export * from './types.js';
+export * from './doc-handler';
+export * from './types';
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/ai-panel.ts b/packages/frontend/core/src/blocksuite/presets/ai/ai-panel.ts
index 12ccd4a94b..8aeb11e3e1 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/ai-panel.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/ai-panel.ts
@@ -23,20 +23,20 @@ import {
InsertTopIcon,
ReplaceIcon,
RetryIcon,
-} from './_common/icons.js';
-import { INSERT_ABOVE_ACTIONS } from './actions/consts.js';
-import { createTextRenderer } from './messages/text.js';
-import { AIProvider } from './provider.js';
-import { reportResponse } from './utils/action-reporter.js';
-import { findNoteBlockModel, getService } from './utils/edgeless.js';
+} from './_common/icons';
+import { INSERT_ABOVE_ACTIONS } from './actions/consts';
+import { createTextRenderer } from './messages/text';
+import { AIProvider } from './provider';
+import { reportResponse } from './utils/action-reporter';
+import { findNoteBlockModel, getService } from './utils/edgeless';
import {
copyTextAnswer,
insertAbove,
insertBelow,
replace,
-} from './utils/editor-actions.js';
-import { insertFromMarkdown } from './utils/markdown-utils.js';
-import { getSelections } from './utils/selection-utils.js';
+} from './utils/editor-actions';
+import { insertFromMarkdown } from './utils/markdown-utils';
+import { getSelections } from './utils/selection-utils';
function getSelection(host: EditorHost) {
const textSelection = host.selection.find('text');
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/ai-spec.ts b/packages/frontend/core/src/blocksuite/presets/ai/ai-spec.ts
index 1c89af9bf2..f2efcc88a1 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/ai-spec.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/ai-spec.ts
@@ -19,16 +19,16 @@ import {
import { assertInstanceOf } from '@blocksuite/global/utils';
import { literal, unsafeStatic } from 'lit/static-html.js';
-import { buildAIPanelConfig } from './ai-panel.js';
-import { setupCodeToolbarEntry } from './entries/code-toolbar/setup-code-toolbar.js';
+import { buildAIPanelConfig } from './ai-panel';
+import { setupCodeToolbarEntry } from './entries/code-toolbar/setup-code-toolbar';
import {
setupEdgelessCopilot,
setupEdgelessElementToolbarEntry,
-} from './entries/edgeless/index.js';
-import { setupFormatBarEntry } from './entries/format-bar/setup-format-bar.js';
-import { setupImageToolbarEntry } from './entries/image-toolbar/setup-image-toolbar.js';
-import { setupSlashMenuEntry } from './entries/slash-menu/setup-slash-menu.js';
-import { setupSpaceEntry } from './entries/space/setup-space.js';
+} from './entries/edgeless/index';
+import { setupFormatBarEntry } from './entries/format-bar/setup-format-bar';
+import { setupImageToolbarEntry } from './entries/image-toolbar/setup-image-toolbar';
+import { setupSlashMenuEntry } from './entries/slash-menu/setup-slash-menu';
+import { setupSpaceEntry } from './entries/space/setup-space';
export const AIPageRootBlockSpec: BlockSpec = {
...PageRootBlockSpec,
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/action-wrapper.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/action-wrapper.ts
index 7c4a490229..5b6e733a22 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/action-wrapper.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/action-wrapper.ts
@@ -21,11 +21,11 @@ import {
AIPresentationIcon,
ArrowDownIcon,
ArrowUpIcon,
-} from '../../_common/icons.js';
-import { createTextRenderer } from '../../messages/text.js';
-import type { ChatAction } from '../chat-context.js';
-import { renderImages } from '../components/images.js';
-import { HISTORY_IMAGE_ACTIONS } from '../const.js';
+} from '../../_common/icons';
+import { createTextRenderer } from '../../messages/text';
+import type { ChatAction } from '../chat-context';
+import { renderImages } from '../components/images';
+import { HISTORY_IMAGE_ACTIONS } from '../const';
const icons: Record<string, TemplateResult<1>> = {
'Fix spelling for it': AIDoneIcon,
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/actions-handle.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/actions-handle.ts
index 047f348777..3a857e5d83 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/actions-handle.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/actions-handle.ts
@@ -15,14 +15,10 @@ import {
NoteDisplayMode,
} from '@blocksuite/blocks';
-import {
- CreateIcon,
- InsertBelowIcon,
- ReplaceIcon,
-} from '../../_common/icons.js';
-import { reportResponse } from '../../utils/action-reporter.js';
-import { insertBelow, replace } from '../../utils/editor-actions.js';
-import { insertFromMarkdown } from '../../utils/markdown-utils.js';
+import { CreateIcon, InsertBelowIcon, ReplaceIcon } from '../../_common/icons';
+import { reportResponse } from '../../utils/action-reporter';
+import { insertBelow, replace } from '../../utils/editor-actions';
+import { insertFromMarkdown } from '../../utils/markdown-utils';
const { matchFlavours } = BlocksUtils;
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/chat-text.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/chat-text.ts
index 80db6d3b0e..1ceeb017a6 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/chat-text.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/chat-text.ts
@@ -1,12 +1,12 @@
-import './action-wrapper.js';
+import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
import { html, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
-import { createTextRenderer } from '../../messages/text.js';
-import { renderImages } from '../components/images.js';
+import { createTextRenderer } from '../../messages/text';
+import { renderImages } from '../components/images';
@customElement('chat-text')
export class ChatText extends WithDisposable(ShadowlessElement) {
@property({ attribute: false })
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/copy-more.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/copy-more.ts
index 28419df1dc..55ba49c73e 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/copy-more.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/copy-more.ts
@@ -10,11 +10,11 @@ import { css, html, LitElement, nothing, type PropertyValues } from 'lit';
import { customElement, property, query, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js';
-import { CopyIcon, MoreIcon, RetryIcon } from '../../_common/icons.js';
-import { AIProvider } from '../../provider.js';
-import { copyText } from '../../utils/editor-actions.js';
-import type { ChatContextValue, ChatMessage } from '../chat-context.js';
-import { PageEditorActions } from './actions-handle.js';
+import { CopyIcon, MoreIcon, RetryIcon } from '../../_common/icons';
+import { AIProvider } from '../../provider';
+import { copyText } from '../../utils/editor-actions';
+import type { ChatContextValue, ChatMessage } from '../chat-context';
+import { PageEditorActions } from './actions-handle';
noop(Tooltip);
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/image-to-text.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/image-to-text.ts
index 7d7173b578..9606ad28b3 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/image-to-text.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/image-to-text.ts
@@ -1,4 +1,4 @@
-import './action-wrapper.js';
+import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
@@ -6,8 +6,8 @@ import { html, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
-import type { ChatAction } from '../chat-context.js';
-import { renderImages } from '../components/images.js';
+import type { ChatAction } from '../chat-context';
+import { renderImages } from '../components/images';
@customElement('action-image-to-text')
export class ActionImageToText extends WithDisposable(ShadowlessElement) {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/image.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/image.ts
index ee7508d793..41de61f3cb 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/image.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/image.ts
@@ -1,4 +1,4 @@
-import './action-wrapper.js';
+import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
@@ -6,8 +6,8 @@ import { html, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
-import type { ChatAction } from '../chat-context.js';
-import { renderImages } from '../components/images.js';
+import type { ChatAction } from '../chat-context';
+import { renderImages } from '../components/images';
@customElement('action-image')
export class ActionImage extends WithDisposable(ShadowlessElement) {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/make-real.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/make-real.ts
index 024637faf8..4dda95cea8 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/make-real.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/make-real.ts
@@ -1,4 +1,4 @@
-import './action-wrapper.js';
+import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
@@ -6,8 +6,8 @@ import { html } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
-import { createIframeRenderer } from '../../messages/wrapper.js';
-import type { ChatAction } from '../chat-context.js';
+import { createIframeRenderer } from '../../messages/wrapper';
+import type { ChatAction } from '../chat-context';
@customElement('action-make-real')
export class ActionMakeReal extends WithDisposable(ShadowlessElement) {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/mindmap.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/mindmap.ts
index dba11f5a5c..4dbc6f7a60 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/mindmap.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/mindmap.ts
@@ -1,4 +1,4 @@
-import './action-wrapper.js';
+import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
@@ -8,7 +8,7 @@ import { html } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
-import type { ChatAction } from '../chat-context.js';
+import type { ChatAction } from '../chat-context';
noop(MiniMindmapPreview);
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/slides.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/slides.ts
index aaf54022d6..9f2bd05f3f 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/slides.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/slides.ts
@@ -1,5 +1,5 @@
-import './action-wrapper.js';
-import '../../messages/slides-renderer.js';
+import './action-wrapper';
+import '../../messages/slides-renderer';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
@@ -7,7 +7,7 @@ import { html, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
-import type { ChatAction } from '../chat-context.js';
+import type { ChatAction } from '../chat-context';
@customElement('action-slides')
export class ActionSlides extends WithDisposable(ShadowlessElement) {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/text.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/text.ts
index e4f9d19684..1301ba5832 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/text.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/actions/text.ts
@@ -1,4 +1,4 @@
-import './action-wrapper.js';
+import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/block-std';
@@ -6,8 +6,8 @@ import { css, html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
-import { createTextRenderer } from '../../messages/text.js';
-import type { ChatAction } from '../chat-context.js';
+import { createTextRenderer } from '../../messages/text';
+import type { ChatAction } from '../chat-context';
@customElement('action-text')
export class ActionText extends WithDisposable(LitElement) {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/ai-loading.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/ai-loading.ts
index 67744a6e5a..70bb2ab984 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/ai-loading.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/ai-loading.ts
@@ -2,7 +2,7 @@ import { WithDisposable } from '@blocksuite/block-std';
import { css, html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
-import { AIStarIconWithAnimation } from '../_common/icons.js';
+import { AIStarIconWithAnimation } from '../_common/icons';
@customElement('ai-loading')
export class AILoading extends WithDisposable(LitElement) {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-cards.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-cards.ts
index d269692a4e..dee2d6157f 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-cards.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-cards.ts
@@ -17,15 +17,15 @@ import {
CurrentSelectionIcon,
DocIcon,
SmallImageIcon,
-} from '../_common/icons.js';
+} from '../_common/icons';
import {
getEdgelessRootFromEditor,
getSelectedImagesAsBlobs,
getSelectedTextContent,
getTextContentFromBlockModels,
selectedToCanvas,
-} from '../utils/selection-utils.js';
-import type { ChatContextValue } from './chat-context.js';
+} from '../utils/selection-utils';
+import type { ChatContextValue } from './chat-context';
const cardsStyles = css`
.card-wrapper {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-panel-input.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-panel-input.ts
index 9d90bbfa8d..a946f23a12 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-panel-input.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-panel-input.ts
@@ -12,11 +12,11 @@ import {
ChatSendIcon,
CloseIcon,
ImageIcon,
-} from '../_common/icons.js';
-import { AIProvider } from '../provider.js';
-import { reportResponse } from '../utils/action-reporter.js';
-import { readBlobAsURL } from '../utils/image.js';
-import type { ChatContextValue, ChatMessage } from './chat-context.js';
+} from '../_common/icons';
+import { AIProvider } from '../provider';
+import { reportResponse } from '../utils/action-reporter';
+import { readBlobAsURL } from '../utils/image';
+import type { ChatContextValue, ChatMessage } from './chat-context';
const MaximumImageCount = 8;
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-panel-messages.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-panel-messages.ts
index a7553d802e..12ad20a414 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-panel-messages.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/chat-panel-messages.ts
@@ -1,16 +1,16 @@
-import '../messages/slides-renderer.js';
-import './ai-loading.js';
-import '../messages/text.js';
-import './actions/text.js';
-import './actions/action-wrapper.js';
-import './actions/make-real.js';
-import './actions/slides.js';
-import './actions/mindmap.js';
-import './actions/chat-text.js';
-import './actions/copy-more.js';
-import './actions/image-to-text.js';
-import './actions/image.js';
-import './chat-cards.js';
+import '../messages/slides-renderer';
+import './ai-loading';
+import '../messages/text';
+import './actions/text';
+import './actions/action-wrapper';
+import './actions/make-real';
+import './actions/slides';
+import './actions/mindmap';
+import './actions/chat-text';
+import './actions/copy-more';
+import './actions/image-to-text';
+import './actions/image';
+import './chat-cards';
import type {
BaseSelection,
@@ -30,27 +30,19 @@ import { customElement, property, query, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js';
import { styleMap } from 'lit/directives/style-map.js';
-import {
- AffineAvatarIcon,
- AffineIcon,
- DownArrowIcon,
-} from '../_common/icons.js';
+import { AffineAvatarIcon, AffineIcon, DownArrowIcon } from '../_common/icons';
import {
GeneralErrorRenderer,
PaymentRequiredErrorRenderer,
-} from '../messages/error.js';
-import { AIProvider } from '../provider.js';
-import { insertBelow } from '../utils/editor-actions.js';
+} from '../messages/error';
+import { AIProvider } from '../provider';
+import { insertBelow } from '../utils/editor-actions';
import {
EdgelessEditorActions,
PageEditorActions,
-} from './actions/actions-handle.js';
-import type {
- ChatContextValue,
- ChatItem,
- ChatMessage,
-} from './chat-context.js';
-import { HISTORY_IMAGE_ACTIONS } from './const.js';
+} from './actions/actions-handle';
+import type { ChatContextValue, ChatItem, ChatMessage } from './chat-context';
+import { HISTORY_IMAGE_ACTIONS } from './const';
@customElement('chat-panel-messages')
export class ChatPanelMessages extends WithDisposable(ShadowlessElement) {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/index.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/index.ts
index a3c529705c..703146e8ca 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/index.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/index.ts
@@ -1,5 +1,5 @@
-import './chat-panel-input.js';
-import './chat-panel-messages.js';
+import './chat-panel-input';
+import './chat-panel-messages';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
@@ -9,14 +9,14 @@ import { css, html, type PropertyValues } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
import { createRef, type Ref, ref } from 'lit/directives/ref.js';
-import { AIHelpIcon, SmallHintIcon } from '../_common/icons.js';
-import { AIProvider } from '../provider.js';
+import { AIHelpIcon, SmallHintIcon } from '../_common/icons';
+import { AIProvider } from '../provider';
import {
getSelectedImagesAsBlobs,
getSelectedTextContent,
-} from '../utils/selection-utils.js';
-import type { ChatAction, ChatContextValue, ChatItem } from './chat-context.js';
-import type { ChatPanelMessages } from './chat-panel-messages.js';
+} from '../utils/selection-utils';
+import type { ChatAction, ChatContextValue, ChatItem } from './chat-context';
+import type { ChatPanelMessages } from './chat-panel-messages';
@customElement('chat-panel')
export class ChatPanel extends WithDisposable(ShadowlessElement) {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/utils.ts b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/utils.ts
index ed8b30df4b..9469259e37 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/utils.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/chat-panel/utils.ts
@@ -2,9 +2,9 @@ import type { EditorHost } from '@blocksuite/block-std';
import type { EdgelessRootService } from '@blocksuite/blocks';
import type { BlockSnapshot } from '@blocksuite/store';
-import { markdownToSnapshot } from '../_common/markdown-utils.js';
-import { getSurfaceElementFromEditor } from '../_common/selection-utils.js';
-import { basicTheme } from '../slides/template.js';
+import { markdownToSnapshot } from '../_common/markdown-utils';
+import { getSurfaceElementFromEditor } from '../_common/selection-utils';
+import { basicTheme } from '../slides/template';
type PPTSection = {
title: string;
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/entries/code-toolbar/setup-code-toolbar.ts b/packages/frontend/core/src/blocksuite/presets/ai/entries/code-toolbar/setup-code-toolbar.ts
index 6e1cc1fdea..cedf09d3cb 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/entries/code-toolbar/setup-code-toolbar.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/entries/code-toolbar/setup-code-toolbar.ts
@@ -1,4 +1,4 @@
-import '../../_common/components/ask-ai-button.js';
+import '../../_common/components/ask-ai-button';
import type {
AffineCodeToolbarWidget,
@@ -12,9 +12,9 @@ const buttonOptions: AskAIButtonOptions = {
panelWidth: 240,
};
-import type { AskAIButtonOptions } from '../../_common/components/ask-ai-button.js';
-import { buildAICodeItemGroups } from '../../_common/config.js';
-import { AIStarIcon } from '../../_common/icons.js';
+import type { AskAIButtonOptions } from '../../_common/components/ask-ai-button';
+import { buildAICodeItemGroups } from '../../_common/config';
+import { AIStarIcon } from '../../_common/icons';
export function setupCodeToolbarEntry(codeToolbar: AffineCodeToolbarWidget) {
const onAskAIClick = () => {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/entries/edgeless/actions-config.ts b/packages/frontend/core/src/blocksuite/presets/ai/entries/edgeless/actions-config.ts
index 6d3d9b172e..2414415ef6 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/entries/edgeless/actions-config.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/entries/edgeless/actions-config.ts
@@ -28,7 +28,7 @@ import {
SelectionIcon,
ShorterIcon,
ToneIcon,
-} from '../../_common/icons.js';
+} from '../../_common/icons';
import {
actionToHandler,
imageOnlyShowWhen,
@@ -36,22 +36,22 @@ import {
mindmapRootShowWhen,
noteBlockOrTextShowWhen,
noteWithCodeBlockShowWen,
-} from '../../actions/edgeless-handler.js';
+} from '../../actions/edgeless-handler';
import {
imageFilterStyles,
imageProcessingTypes,
textTones,
translateLangs,
-} from '../../actions/types.js';
-import { getAIPanel } from '../../ai-panel.js';
-import { AIProvider } from '../../provider.js';
-import { mindMapToMarkdown } from '../../utils/edgeless.js';
-import { canvasToBlob, randomSeed } from '../../utils/image.js';
+} from '../../actions/types';
+import { getAIPanel } from '../../ai-panel';
+import { AIProvider } from '../../provider';
+import { mindMapToMarkdown } from '../../utils/edgeless';
+import { canvasToBlob, randomSeed } from '../../utils/image';
import {
getCopilotSelectedElems,
getEdgelessRootFromEditor,
imageCustomInput,
-} from '../../utils/selection-utils.js';
+} from '../../utils/selection-utils';
const translateSubItem = translateLangs.map(lang => {
return {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/entries/edgeless/index.ts b/packages/frontend/core/src/blocksuite/presets/ai/entries/edgeless/index.ts
index d312336ea2..0b221d0b02 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/entries/edgeless/index.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/entries/edgeless/index.ts
@@ -8,7 +8,7 @@ import { EdgelessCopilotToolbarEntry } from '@blocksuite/blocks';
import { noop } from '@blocksuite/global/utils';
import { html } from 'lit';
-import { edgelessActionGroups } from './actions-config.js';
+import { edgelessActionGroups } from './actions-config';
noop(EdgelessCopilotToolbarEntry);
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/entries/format-bar/setup-format-bar.ts b/packages/frontend/core/src/blocksuite/presets/ai/entries/format-bar/setup-format-bar.ts
index 953829cca2..90302086b4 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/entries/format-bar/setup-format-bar.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/entries/format-bar/setup-format-bar.ts
@@ -1,4 +1,4 @@
-import '../../_common/components/ask-ai-button.js';
+import '../../_common/components/ask-ai-button';
import {
type AffineFormatBarWidget,
@@ -6,7 +6,7 @@ import {
} from '@blocksuite/blocks';
import { html, type TemplateResult } from 'lit';
-import { AIItemGroups } from '../../_common/config.js';
+import { AIItemGroups } from '../../_common/config';
export function setupFormatBarEntry(formatBar: AffineFormatBarWidget) {
toolbarDefaultConfig(formatBar);
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/entries/image-toolbar/setup-image-toolbar.ts b/packages/frontend/core/src/blocksuite/presets/ai/entries/image-toolbar/setup-image-toolbar.ts
index 1aa32d6db3..b4f9e4a9ba 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/entries/image-toolbar/setup-image-toolbar.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/entries/image-toolbar/setup-image-toolbar.ts
@@ -1,4 +1,4 @@
-import '../../_common/components/ask-ai-button.js';
+import '../../_common/components/ask-ai-button';
import type {
AffineImageToolbarWidget,
@@ -6,8 +6,8 @@ import type {
} from '@blocksuite/blocks';
import { html } from 'lit';
-import type { AskAIButtonOptions } from '../../_common/components/ask-ai-button.js';
-import { buildAIImageItemGroups } from '../../_common/config.js';
+import type { AskAIButtonOptions } from '../../_common/components/ask-ai-button';
+import { buildAIImageItemGroups } from '../../_common/config';
const AIImageItemGroups = buildAIImageItemGroups();
const buttonOptions: AskAIButtonOptions = {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/entries/index.ts b/packages/frontend/core/src/blocksuite/presets/ai/entries/index.ts
index a3c78cc140..e21ec265fd 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/entries/index.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/entries/index.ts
@@ -1,2 +1,2 @@
-export * from './format-bar/setup-format-bar.js';
-export * from './space/setup-space.js';
+export * from './format-bar/setup-format-bar';
+export * from './space/setup-space';
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/entries/slash-menu/setup-slash-menu.ts b/packages/frontend/core/src/blocksuite/presets/ai/entries/slash-menu/setup-slash-menu.ts
index 0c6b510c0a..14ef788cf1 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/entries/slash-menu/setup-slash-menu.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/entries/slash-menu/setup-slash-menu.ts
@@ -15,9 +15,9 @@ import {
import { assertExists } from '@blocksuite/global/utils';
import { html } from 'lit';
-import { AIItemGroups } from '../../_common/config.js';
-import { handleInlineAskAIAction } from '../../actions/doc-handler.js';
-import { AIProvider } from '../../provider.js';
+import { AIItemGroups } from '../../_common/config';
+import { handleInlineAskAIAction } from '../../actions/doc-handler';
+import { AIProvider } from '../../provider';
export function setupSlashMenuEntry(slashMenu: AffineSlashMenuWidget) {
const AIItems = AIItemGroups.map(group => group.items).flat();
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/entries/space/setup-space.ts b/packages/frontend/core/src/blocksuite/presets/ai/entries/space/setup-space.ts
index 5416983bfe..3f990f014e 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/entries/space/setup-space.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/entries/space/setup-space.ts
@@ -1,7 +1,7 @@
import type { AffineAIPanelWidget } from '@blocksuite/blocks';
-import { handleInlineAskAIAction } from '../../actions/doc-handler.js';
-import { AIProvider } from '../../provider.js';
+import { handleInlineAskAIAction } from '../../actions/doc-handler';
+import { AIProvider } from '../../provider';
export function setupSpaceEntry(panel: AffineAIPanelWidget) {
panel.handleEvent('keyDown', ctx => {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/index.ts b/packages/frontend/core/src/blocksuite/presets/ai/index.ts
index 831844785f..8391e00153 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/index.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/index.ts
@@ -1,7 +1,7 @@
-export * from './actions/index.js';
-export * from './ai-spec.js';
-export { ChatPanel } from './chat-panel/index.js';
-export * from './entries/edgeless/actions-config.js';
-export * from './entries/index.js';
-export * from './messages/index.js';
-export * from './provider.js';
+export * from './actions/index';
+export * from './ai-spec';
+export { ChatPanel } from './chat-panel/index';
+export * from './entries/edgeless/actions-config';
+export * from './entries/index';
+export * from './messages/index';
+export * from './provider';
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/messages/error.ts b/packages/frontend/core/src/blocksuite/presets/ai/messages/error.ts
index 179b6c7058..87720069e3 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/messages/error.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/messages/error.ts
@@ -2,8 +2,8 @@ import { type EditorHost, WithDisposable } from '@blocksuite/block-std';
import { html, LitElement, nothing, type TemplateResult } from 'lit';
import { customElement, property } from 'lit/decorators.js';
-import { ErrorTipIcon } from '../_common/icons.js';
-import { AIProvider } from '../provider.js';
+import { ErrorTipIcon } from '../_common/icons';
+import { AIProvider } from '../provider';
@customElement('ai-error-wrapper')
class AIErrorWrapper extends WithDisposable(LitElement) {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/messages/index.ts b/packages/frontend/core/src/blocksuite/presets/ai/messages/index.ts
index 18b83aab05..38d7c4a21d 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/messages/index.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/messages/index.ts
@@ -1,2 +1,2 @@
-export * from './text.js';
-export * from './wrapper.js';
+export * from './text';
+export * from './wrapper';
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/messages/mindmap.ts b/packages/frontend/core/src/blocksuite/presets/ai/messages/mindmap.ts
index f93b05b9c1..be3c15d5c3 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/messages/mindmap.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/messages/mindmap.ts
@@ -7,7 +7,7 @@ import { markdownToMindmap, MiniMindmapPreview } from '@blocksuite/blocks';
import { noop } from '@blocksuite/global/utils';
import { html, nothing } from 'lit';
-import { getAIPanel } from '../ai-panel.js';
+import { getAIPanel } from '../ai-panel';
noop(MiniMindmapPreview);
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/messages/slides-renderer.ts b/packages/frontend/core/src/blocksuite/presets/ai/messages/slides-renderer.ts
index 585030f954..b416e5b215 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/messages/slides-renderer.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/messages/slides-renderer.ts
@@ -11,8 +11,8 @@ import { css, html, LitElement, nothing } from 'lit';
import { customElement, property, query } from 'lit/decorators.js';
import { createRef, type Ref, ref } from 'lit/directives/ref.js';
-import { getAIPanel } from '../ai-panel.js';
-import { PPTBuilder } from '../slides/index.js';
+import { getAIPanel } from '../ai-panel';
+import { PPTBuilder } from '../slides/index';
export const createSlidesRenderer: (
host: EditorHost,
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/messages/text.ts b/packages/frontend/core/src/blocksuite/presets/ai/messages/text.ts
index e3e8b0868b..90c8bdc410 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/messages/text.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/messages/text.ts
@@ -16,8 +16,8 @@ import { customElement, property, query } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { keyed } from 'lit/directives/keyed.js';
-import { CustomPageEditorBlockSpecs } from '../utils/custom-specs.js';
-import { markDownToDoc } from '../utils/markdown-utils.js';
+import { CustomPageEditorBlockSpecs } from '../utils/custom-specs';
+import { markDownToDoc } from '../utils/markdown-utils';
const textBlockStyles = css`
${ParagraphBlockComponent.styles}
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/messages/wrapper.ts b/packages/frontend/core/src/blocksuite/presets/ai/messages/wrapper.ts
index 3ae585473e..f4f23ca39a 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/messages/wrapper.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/messages/wrapper.ts
@@ -3,8 +3,8 @@ import type { AffineAIPanelWidgetConfig } from '@blocksuite/blocks';
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
-import { getAIPanel } from '../ai-panel.js';
-import { preprocessHtml } from '../utils/html.js';
+import { getAIPanel } from '../ai-panel';
+import { preprocessHtml } from '../utils/html';
type AIAnswerWrapperOptions = {
height: number;
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/slides/index.ts b/packages/frontend/core/src/blocksuite/presets/ai/slides/index.ts
index c4825adf2b..6acfba5282 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/slides/index.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/slides/index.ts
@@ -2,14 +2,14 @@ import type { EditorHost } from '@blocksuite/block-std';
import type { EdgelessRootService } from '@blocksuite/blocks';
import type { BlockSnapshot } from '@blocksuite/store';
-import { markdownToSnapshot } from '../_common/markdown-utils.js';
-import { getSurfaceElementFromEditor } from '../_common/selection-utils.js';
+import { markdownToSnapshot } from '../_common/markdown-utils';
+import { getSurfaceElementFromEditor } from '../_common/selection-utils';
import {
basicTheme,
type PPTDoc,
type PPTSection,
type TemplateImage,
-} from './template.js';
+} from './template';
export const PPTBuilder = (host: EditorHost) => {
const service = host.spec.getService<EdgelessRootService>('affine:page');
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/slides/template.ts b/packages/frontend/core/src/blocksuite/presets/ai/slides/template.ts
index 05af834ec0..97a9d4a0b3 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/slides/template.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/slides/template.ts
@@ -1,7 +1,7 @@
import { Bound } from '@blocksuite/blocks';
import { nanoid } from '@blocksuite/store';
-import { AIProvider } from '../provider.js';
+import { AIProvider } from '../provider';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const replaceText = (text: Record<string, string>, template: any) => {
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/utils/action-reporter.ts b/packages/frontend/core/src/blocksuite/presets/ai/utils/action-reporter.ts
index 28acbef29b..8ceb374020 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/utils/action-reporter.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/utils/action-reporter.ts
@@ -1,4 +1,4 @@
-import { type ActionEventType, AIProvider } from '../provider.js';
+import { type ActionEventType, AIProvider } from '../provider';
export function reportResponse(event: ActionEventType) {
const lastAction = AIProvider.actionHistory.at(-1);
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/utils/editor-actions.ts b/packages/frontend/core/src/blocksuite/presets/ai/utils/editor-actions.ts
index 9dc1748d1c..8684566167 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/utils/editor-actions.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/utils/editor-actions.ts
@@ -11,7 +11,7 @@ import {
insertFromMarkdown,
markDownToDoc,
markdownToSnapshot,
-} from './markdown-utils.js';
+} from './markdown-utils';
const getNoteId = (blockElement: BlockElement) => {
let element = blockElement;
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/utils/selection-utils.ts b/packages/frontend/core/src/blocksuite/presets/ai/utils/selection-utils.ts
index 7a2239562e..fca6cc8c23 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/utils/selection-utils.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/utils/selection-utils.ts
@@ -14,8 +14,8 @@ import {
toDraftModel,
} from '@blocksuite/store';
-import { getEdgelessCopilotWidget, getService } from './edgeless.js';
-import { getContentFromSlice } from './markdown-utils.js';
+import { getEdgelessCopilotWidget, getService } from './edgeless';
+import { getContentFromSlice } from './markdown-utils';
export const getRootService = (host: EditorHost) => {
return host.std.spec.getService('affine:page');