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:
@@ -95,12 +95,25 @@ describe("resolveResearchSettings", () => {
|
||||
expect(resolved.searchProvider).toBe("brave");
|
||||
});
|
||||
|
||||
it("honors explicit legacy global search provider opt-out", () => {
|
||||
it("forces web search on even when persisted settings disable it", () => {
|
||||
const resolved = resolveResearchSettings({
|
||||
researchGlobalWebSearchProvider: "none",
|
||||
researchGlobalDefaults: {
|
||||
enabledSources: {
|
||||
webSearch: false,
|
||||
pageFetch: true,
|
||||
github: false,
|
||||
localDocs: true,
|
||||
llmSynthesis: true,
|
||||
},
|
||||
},
|
||||
researchSettings: {
|
||||
enabledSources: {
|
||||
webSearch: false,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(resolved.searchProvider).toBe("none");
|
||||
expect(resolved.enabledSources.webSearch).toBe(true);
|
||||
});
|
||||
|
||||
it("supports null-as-delete semantics for researchSettings object", () => {
|
||||
|
||||
@@ -22,8 +22,7 @@ export interface ResolvedResearchSettings {
|
||||
|
||||
const DEFAULT_SEARCH_PROVIDER = "builtin";
|
||||
|
||||
const FALLBACK_SOURCES: ResearchEnabledSources = {
|
||||
webSearch: true,
|
||||
const FALLBACK_SOURCES: Omit<ResearchEnabledSources, "webSearch"> = {
|
||||
pageFetch: true,
|
||||
github: false,
|
||||
localDocs: true,
|
||||
@@ -44,10 +43,7 @@ export function resolveResearchSettings(settings: Partial<Settings> | undefined)
|
||||
synthesisProvider: projectSettings?.synthesisProvider ?? globalDefaults?.synthesisProvider,
|
||||
synthesisModelId: projectSettings?.synthesisModelId ?? globalDefaults?.synthesisModelId,
|
||||
enabledSources: {
|
||||
webSearch:
|
||||
projectSettings?.enabledSources?.webSearch ??
|
||||
globalDefaults?.enabledSources?.webSearch ??
|
||||
FALLBACK_SOURCES.webSearch,
|
||||
webSearch: true,
|
||||
pageFetch:
|
||||
projectSettings?.enabledSources?.pageFetch ??
|
||||
globalDefaults?.enabledSources?.pageFetch ??
|
||||
|
||||
@@ -1531,7 +1531,7 @@ export interface DaemonTokenSettings {
|
||||
* The dashboard UI shows these under a "Global" section.
|
||||
*/
|
||||
/** Web search backend for auto-research provider. */
|
||||
export type WebSearchBackend = "builtin" | "searxng" | "brave" | "google" | "tavily" | "none";
|
||||
export type WebSearchBackend = "builtin" | "searxng" | "brave" | "google" | "tavily";
|
||||
|
||||
export interface ResearchEnabledSources {
|
||||
webSearch: boolean;
|
||||
@@ -1858,7 +1858,7 @@ export interface GlobalSettings {
|
||||
/** Default maximum number of synthesis rounds per run.
|
||||
* Default: 2. */
|
||||
researchGlobalMaxSynthesisRounds?: number;
|
||||
/** Web search backend for auto-research. Default: "builtin". */
|
||||
/** Web search backend for auto-research. Default: "builtin"; web search itself cannot be disabled. */
|
||||
researchGlobalWebSearchProvider?: WebSearchBackend;
|
||||
/** SearXNG instance URL (required when researchGlobalWebSearchProvider is "searxng"). */
|
||||
researchGlobalSearxngUrl?: string;
|
||||
|
||||
Reference in New Issue
Block a user