From fdb3110407beca63b63ce93999927e8d26b8b877 Mon Sep 17 00:00:00 2001 From: oabrivard Date: Mon, 23 Mar 2026 23:19:02 +0100 Subject: [PATCH] feat: add source_diversity_window setting to frontend Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/i18n/fr.ts | 1 + frontend/src/pages/Settings.tsx | 26 ++++++++++++++++++++++++++ frontend/src/types.ts | 2 ++ 3 files changed, 29 insertions(+) diff --git a/frontend/src/i18n/fr.ts b/frontend/src/i18n/fr.ts index 26b55c3..3f99b0d 100644 --- a/frontend/src/i18n/fr.ts +++ b/frontend/src/i18n/fr.ts @@ -124,6 +124,7 @@ const fr = { 'settings.maxAgeDays': 'Anciennete maximum (jours)', 'settings.maxItems': 'Actualites max par categorie', 'settings.maxArticlesPerSource': 'Articles max par source', + 'settings.diversityWindow': 'Syntheses a examiner pour diversite', 'settings.searchBehavior': "Comportement de l'agent de recherche", 'settings.searchBehaviorHelp': "Personnalisez les instructions donnees a l'IA concernant sa methode de recherche.", diff --git a/frontend/src/pages/Settings.tsx b/frontend/src/pages/Settings.tsx index 6f98105..e61a097 100644 --- a/frontend/src/pages/Settings.tsx +++ b/frontend/src/pages/Settings.tsx @@ -426,6 +426,32 @@ const Settings: Component = () => { /> + +
+ +
+ + setSettings((prev) => ({ + ...prev, + source_diversity_window: + parseInt(e.currentTarget.value) || 3, + })) + } + /> +
+
{/* Search agent behavior */} diff --git a/frontend/src/types.ts b/frontend/src/types.ts index a9e37e4..6e1d135 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -44,6 +44,7 @@ export interface UserSettings { max_age_days: number; max_items_per_category: number; max_articles_per_source: number; + source_diversity_window: number; search_agent_behavior: string; ai_model: string; ai_model_writing: string; @@ -58,6 +59,7 @@ export const DEFAULT_SETTINGS: UserSettings = { max_age_days: 7, max_items_per_category: 4, max_articles_per_source: 3, + source_diversity_window: 3, search_agent_behavior: "Tu peux egalement utiliser d'autres sources pertinentes trouvees via la recherche Google.", ai_model: '',