diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json index 50ed47a..4bdc859 100644 --- a/frontend/src/i18n/locales/de.json +++ b/frontend/src/i18n/locales/de.json @@ -1404,5 +1404,41 @@ "defaultProvider": "Standard-Anbieter", "defaultTag": "(Standard)", "confirmDeleteProvider": "Anbieter wirklich löschen?" + }, + "proactiveAI": { + "categories": { + "mail": "E-Mails", + "tasks": "Aufgaben", + "contacts": "Kontakte", + "companies": "Firmen", + "insights": "Erkenntnisse" + }, + "models": { + "deepseekV4": "DeepSeek V4 (empfohlen)", + "deepseekV4Pro": "DeepSeek V4 Pro (präzise)", + "llama32": "Llama 3.2 (Alternative)", + "gpt4oMiniOllama": "GPT-4o mini via Ollama", + "gpt4oMiniDirect": "GPT-4o mini (Direct OpenAI)" + }, + "loading": "Lade Einstellungen...", + "title": "Proaktive KI", + "toggleDescription": "Aktiviert oder deaktiviert alle Vorschläge", + "categoriesTitle": "Kategorien", + "categoriesDescription": "Für welche Bereiche sollen Vorschläge generiert werden?", + "confidenceThreshold": "Confidence Schwellwert", + "confidenceDescription": "Nur Vorschläge mit höherer Confidence anzeigen", + "all": "Alle", + "veryConfident": "Sehr sicher", + "rateLimitTitle": "Rate Limit", + "rateLimitDescription": "Mindestabstand zwischen Vorschlägen", + "modelTitle": "KI Modell (Ollama Cloud)", + "modelDescription": "Wähle das Modell für Vorschläge. DeepSeek V4 ist empfohlen für beste Performance/Kosten.", + "heartbeatTitle": "Heartbeat", + "heartbeatDescription": "Regelmäßige Status-Meldung an KI-Raum", + "heartbeatEnable": "Heartbeat aktivieren", + "interval": "Intervall", + "targetRoom": "Ziel-Raum", + "targetRoomDescription": "Name des Raums in der Kommunikation, an den Status-Meldungen gesendet werden.", + "defaultRoomName": "Live KI" } } diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index c0316b7..3cf840e 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -1404,5 +1404,41 @@ "defaultProvider": "Default provider", "defaultTag": "(default)", "confirmDeleteProvider": "Really delete provider?" + }, + "proactiveAI": { + "categories": { + "mail": "Emails", + "tasks": "Tasks", + "contacts": "Contacts", + "companies": "Companies", + "insights": "Insights" + }, + "models": { + "deepseekV4": "DeepSeek V4 (empfohlen)", + "deepseekV4Pro": "DeepSeek V4 Pro (präzise)", + "llama32": "Llama 3.2 (Alternative)", + "gpt4oMiniOllama": "GPT-4o mini via Ollama", + "gpt4oMiniDirect": "GPT-4o mini (Direct OpenAI)" + }, + "loading": "Loading settings...", + "title": "Proactive AI", + "toggleDescription": "Enables or disables all suggestions", + "categoriesTitle": "Categories", + "categoriesDescription": "Which areas should suggestions be generated for?", + "confidenceThreshold": "Confidence threshold", + "confidenceDescription": "Only show suggestions with higher confidence", + "all": "All", + "veryConfident": "Very confident", + "rateLimitTitle": "Rate limit", + "rateLimitDescription": "Minimum distance between suggestions", + "modelTitle": "AI Model (Ollama Cloud)", + "modelDescription": "Choose the model for suggestions. DeepSeek V4 is recommended for best performance/cost.", + "heartbeatTitle": "Heartbeat", + "heartbeatDescription": "Regular status messages to the AI room", + "heartbeatEnable": "Enable heartbeat", + "interval": "Interval", + "targetRoom": "Target room", + "targetRoomDescription": "Name of the room in Communication that status messages are sent to.", + "defaultRoomName": "Live AI" } } diff --git a/frontend/src/pages/ProactiveAISettings.tsx b/frontend/src/pages/ProactiveAISettings.tsx index effabc1..9fe657e 100644 --- a/frontend/src/pages/ProactiveAISettings.tsx +++ b/frontend/src/pages/ProactiveAISettings.tsx @@ -1,29 +1,16 @@ +import { useTranslation } from 'react-i18next'; import { useProactiveSettings } from '@/api/aiProactive'; -// TODO: P2-T20 — Replace hardcoded categoryLabels/modelOptions with backend config -const categoryLabels: Record = { - mail: 'E-Mails', - tasks: 'Aufgaben', - contacts: 'Kontakte', - companies: 'Firmen', - insights: 'Erkenntnisse', -}; - -const modelOptions = [ - { value: 'ollama/deepseek-v4', label: 'DeepSeek V4 (empfohlen)' }, - { value: 'ollama/deepseek-v4-pro', label: 'DeepSeek V4 Pro (präzise)' }, - { value: 'ollama/llama3.2', label: 'Llama 3.2 (Alternative)' }, - { value: 'ollama/gpt-4o-mini', label: 'GPT-4o mini via Ollama' }, - { value: 'gpt-4o-mini', label: 'GPT-4o mini (Direct OpenAI)' }, -]; +const categoryKeys = ['mail', 'tasks', 'contacts', 'companies', 'insights']; export function ProactiveAISettings() { + const { t } = useTranslation(); const { settings, update } = useProactiveSettings(); if (!settings) { return (
-
Lade Einstellungen...
+
{t('proactiveAI.loading')}
); } @@ -41,8 +28,8 @@ export function ProactiveAISettings() { {/* Enable/Disable */}
-

Proaktive KI

-

Aktiviert oder deaktiviert alle Vorschläge

+

{t('proactiveAI.title')}

+

{t('proactiveAI.toggleDescription')}