feat(core): add web search tool and reasoning params (#11912)

Close [AI-60](https://linear.app/affine-design/issue/AI-60).

### What changed?
- Add Exa web search tool
- Add reasoning params
This commit is contained in:
akumatus
2025-04-24 12:23:05 +00:00
parent c6a8160c52
commit a603c06fab
18 changed files with 200 additions and 119 deletions

View File

@@ -3,7 +3,6 @@ import {
type Signal,
} from '@blocksuite/affine/shared/utils';
import { LiveData, Service } from '@toeverything/infra';
import { map } from 'rxjs';
import type { FeatureFlagService } from '../../feature-flag';
import type { GlobalStateService } from '../../storage';
@@ -42,9 +41,7 @@ export class AINetworkSearchService extends Service {
this.featureFlagService.flags.enable_ai_network_search.$;
private readonly _enabled$ = LiveData.from(
this.globalStateService.globalState
.watch<boolean>(AI_NETWORK_SEARCH_KEY)
.pipe(map(v => (v === undefined ? true : v))),
this.globalStateService.globalState.watch<boolean>(AI_NETWORK_SEARCH_KEY),
undefined
);