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: font of AI panel should not be affected by the font of Editor settings (#9305)

akumatus5e2e58de0902
diff --git a/blocksuite/blocks/src/root-block/widgets/ai-panel/ai-panel.ts b/blocksuite/blocks/src/root-block/widgets/ai-panel/ai-panel.ts
index 046850352a..d6ff0d1033 100644
--- a/blocksuite/blocks/src/root-block/widgets/ai-panel/ai-panel.ts
+++ b/blocksuite/blocks/src/root-block/widgets/ai-panel/ai-panel.ts
@@ -54,6 +54,7 @@ export class AffineAIPanelWidget extends WidgetComponent {
overflow-y: auto;
scrollbar-width: none !important;
z-index: var(--affine-z-index-popover);
+ --affine-font-family: var(--affine-font-sans-family);
}
.ai-panel-container {
diff --git a/blocksuite/blocks/src/root-block/widgets/ai-panel/components/finish-tip.ts b/blocksuite/blocks/src/root-block/widgets/ai-panel/components/finish-tip.ts
index 0dcefeb2ea..52ab3aae27 100644
--- a/blocksuite/blocks/src/root-block/widgets/ai-panel/components/finish-tip.ts
+++ b/blocksuite/blocks/src/root-block/widgets/ai-panel/components/finish-tip.ts
@@ -6,13 +6,17 @@ import {
import { NotificationProvider } from '@blocksuite/affine-shared/services';
import type { EditorHost } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
-import { css, html, LitElement, nothing } from 'lit';
+import { baseTheme } from '@toeverything/theme';
+import { css, html, LitElement, nothing, unsafeCSS } from 'lit';
import { property, state } from 'lit/decorators.js';
import type { CopyConfig } from '../type.js';
export class AIFinishTip extends WithDisposable(LitElement) {
static override styles = css`
+ :host {
+ font-family: ${unsafeCSS(baseTheme.fontSansFamily)};
+ }
.finish-tip {
display: flex;
box-sizing: border-box;