diff --git a/frontend/src/components/settings/SettingsAdvanced.tsx b/frontend/src/components/settings/SettingsAdvanced.tsx new file mode 100644 index 0000000..bfc9813 --- /dev/null +++ b/frontend/src/components/settings/SettingsAdvanced.tsx @@ -0,0 +1,143 @@ +import { type Component } from 'solid-js'; +import { A } from '@solidjs/router'; +import { useI18n } from '~/i18n'; +import type { UserSettings } from '~/types'; + +interface SettingsAdvancedProps { + settings: () => UserSettings; + setSettings: (updater: (prev: UserSettings) => UserSettings) => void; +} + +/** + * Advanced settings section on the Settings page. + * + * Groups fields that control extraction and pipeline behaviour: + * - `article_history_days` — deduplication window + * - `batch_size` — number of sources processed per LLM batch + * - `use_llm_for_source_links` — whether to use LLM to extract links + * - `search_agent_behavior` — free-text prompt injection for the search agent + */ +const SettingsAdvanced: Component = (props) => { + const { t } = useI18n(); + + return ( + <> + {/* articleHistoryDays + batchSize grid */} +
+
+ +
+ + props.setSettings((prev) => ({ + ...prev, + article_history_days: + parseInt(e.currentTarget.value) || 90, + })) + } + /> +
+ +
+ +
+ +

{t('settings.batchSizeHelp')}

+
+ + props.setSettings((prev) => ({ + ...prev, + batch_size: + parseInt(e.currentTarget.value) || 5, + })) + } + /> +
+
+
+ + {/* Advanced extraction */} +
+

+ {t('settings.advancedExtraction')} +

+
+
+ + props.setSettings((prev) => ({ + ...prev, + use_llm_for_source_links: e.currentTarget.checked, + })) + } + class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded" + /> + +
+
+
+ + {/* Search agent behavior */} +
+ +
+