import { useProactiveSettings } from './api'; 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)' }, ]; export function AISettings() { const { settings, update } = useProactiveSettings(); if (!settings) { return (
Lade Einstellungen...
); } const toggleCategory = async (cat: string) => { const current = settings.suggestion_categories || []; const newCats = current.includes(cat) ? current.filter((c: string) => c !== cat) : [...current, cat]; await update({ suggestion_categories: newCats }); }; return (
{/* Enable/Disable */}

Proaktive KI

Aktiviert oder deaktiviert alle Vorschläge

{/* Categories */}

Kategorien

Für welche Bereiche sollen Vorschläge generiert werden?

{Object.entries(categoryLabels).map(([key, label]) => { const checked = settings.suggestion_categories?.includes(key); return ( ); })}
{/* Confidence Threshold */}

Confidence Schwellwert

{Math.round((settings.confidence_threshold || 0.5) * 100)}%

Nur Vorschläge mit höherer Confidence anzeigen

update({ confidence_threshold: parseFloat(e.target.value) })} className="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-500" />
Alle Sehr sicher
{/* Rate Limit */}

Rate Limit

{settings.rate_limit_seconds || 10}s

Mindestabstand zwischen Vorschlägen

update({ rate_limit_seconds: parseInt(e.target.value) })} className="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-500" />
5s 60s
{/* Model Selection */}

KI Modell (Ollama Cloud)

Wähle das Modell für Vorschläge. DeepSeek V4 ist empfohlen für beste Performance/Kosten.

); }