import React from 'react'; import { Settings, X, ChevronDown, Key, Globe } from 'lucide-react'; import { AppConfig, ModelOption, ThinkingLevel } from './types'; import { getValidThinkingLevels } from './config'; const SettingsModal = ({ isOpen, onClose, config, setConfig, model }: { isOpen: boolean; onClose: () => void; config: AppConfig; setConfig: (c: AppConfig) => void; model: ModelOption; }) => { if (!isOpen) return null; const validLevels = getValidThinkingLevels(model); const LevelSelect = ({ label, value, onChange, desc }: { label: string, value: ThinkingLevel, onChange: (v: ThinkingLevel) => void, desc: string }) => (
{value}

{desc}

); return (

Configuration

{/* Connection Settings */}

API Connection

{/* Toggle Switch */}
{config.enableCustomApi && (
setConfig({ ...config, customApiKey: e.target.value })} className="w-full bg-white border border-slate-200 text-slate-800 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 outline-none placeholder:text-slate-400" />
setConfig({ ...config, customBaseUrl: e.target.value })} className="w-full bg-white border border-slate-200 text-slate-800 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 outline-none placeholder:text-slate-400" />
)}

Thinking Process

setConfig({ ...config, planningLevel: v })} desc="Controls the depth of initial query analysis and expert delegation." /> setConfig({ ...config, expertLevel: v })} desc="Determines how deeply each expert persona thinks about their specific task." /> setConfig({ ...config, synthesisLevel: v })} desc="Controls the reasoning effort for aggregating results into the final answer." />
); }; export default SettingsModal;