feat(FN-4135): add always-on web search with locked provider setting
Adds always-on web search capability to the research system, locking the web search provider in settings UI and updating the ResearchView to surface web search as a persistent toggle with agent tool integration, plus corresponding docs and test coverage. Fusion-Task-Id: FN-4135
This commit is contained in:
@@ -43,7 +43,6 @@ async function getStore(projectName?: string): Promise<TaskStore> {
|
||||
|
||||
function hasProviderCredentials(settings: Awaited<ReturnType<TaskStore["getSettings"]>>, providerId: string | undefined): boolean {
|
||||
if (!providerId || providerId === "builtin") return true;
|
||||
if (providerId === "none") return false;
|
||||
if (providerId === "searxng") return Boolean(settings.researchGlobalSearxngUrl);
|
||||
if (providerId === "brave") return Boolean(settings.researchGlobalBraveApiKey);
|
||||
if (providerId === "google") return Boolean(settings.researchGlobalGoogleSearchApiKey && settings.researchGlobalGoogleSearchCx);
|
||||
@@ -59,7 +58,7 @@ async function getResearchRuntime(store: TaskStore) {
|
||||
}
|
||||
|
||||
const configuredProvider = (resolved.searchProvider as string | undefined) ?? settings.researchGlobalWebSearchProvider ?? "builtin";
|
||||
if (configuredProvider !== "builtin" && configuredProvider !== "none" && !hasProviderCredentials(settings, configuredProvider)) {
|
||||
if (configuredProvider !== "builtin" && !hasProviderCredentials(settings, configuredProvider)) {
|
||||
throw new Error(`missing-credentials: ${configuredProvider} credentials are missing. Configure Authentication and Research defaults in settings.`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user