From dfce0116b65ddb6eda4674016de5c50f4569657e Mon Sep 17 00:00:00 2001 From: Wu Yue Date: Thu, 31 Jul 2025 14:43:32 +0800 Subject: [PATCH] fix(core): remove network search button on ask ai input (#13373) Close [AI-395](https://linear.app/affine-design/issue/AI-395) ## Summary by CodeRabbit * **Refactor** * Removed the network search feature and its related UI elements from the AI input panel. The input panel now only includes the input textarea and send button. --- .../ai-panel/components/state/input.ts | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/input.ts b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/input.ts index 299c25641..6054eed67 100644 --- a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/input.ts +++ b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/input.ts @@ -3,7 +3,7 @@ import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit'; import { ColorScheme } from '@blocksuite/affine/model'; import { unsafeCSSVarV2 } from '@blocksuite/affine/shared/theme'; import { stopPropagation } from '@blocksuite/affine/shared/utils'; -import { PublishIcon, SendIcon } from '@blocksuite/icons/lit'; +import { SendIcon } from '@blocksuite/icons/lit'; import { darkCssVariablesV2, lightCssVariablesV2, @@ -11,8 +11,6 @@ import { import { css, html, LitElement, nothing, unsafeCSS } from 'lit'; import { property, query, state } from 'lit/decorators.js'; -import type { AINetworkSearchConfig } from '../../type'; - export class AIPanelInput extends SignalWatcher(WithDisposable(LitElement)) { static override styles = css` :host { @@ -217,14 +215,6 @@ export class AIPanelInput extends SignalWatcher(WithDisposable(LitElement)) { this.remove(); }; - private readonly _toggleNetworkSearch = (e: MouseEvent) => { - e.preventDefault(); - e.stopPropagation(); - - const enable = this.networkSearchConfig.enabled.value; - this.networkSearchConfig.setEnabled(!enable); - }; - override render() { return html`
${AIStarIcon}
@@ -242,21 +232,6 @@ export class AIPanelInput extends SignalWatcher(WithDisposable(LitElement)) { @paste=${stopPropagation} @keyup=${stopPropagation} > - ${this.networkSearchConfig.visible.value - ? html` -
- ${PublishIcon()} - - Toggle Network Search - -
- ` - : nothing}
void) | undefined = undefined;