fix(core): not using Internet search after user selects document or file (#10058)

Fix issue [BS-2546](https://linear.app/affine-design/issue/BS-2546).
This commit is contained in:
akumatus
2025-02-10 10:40:14 +00:00
parent 6839e634e7
commit 397887e3b5
2 changed files with 11 additions and 12 deletions
@@ -363,7 +363,10 @@ export class ChatPanelInput extends SignalWatcher(WithDisposable(LitElement)) {
const { images, status } = this.chatContextValue;
const hasImages = images.length > 0;
const maxHeight = hasImages ? 272 + 2 : 200 + 2;
const networkDisabled = !!this.chatContextValue.images.length;
const networkDisabled =
!!this.chatContextValue.images.length ||
!!this.chatContextValue.chips.filter(chip => chip.state !== 'candidate')
.length;
const networkActive = !!this.networkSearchConfig.enabled.value;
const uploadDisabled = networkActive && !networkDisabled;
return html`<style>