import GeneralSettings from './GeneralSettings'
import InterfaceSettings from './InterfaceSettings'
import WebsearchSettings from './WebsearchSettings'
import { normalizeWebsearchEngines } from './websearchEngines'
const SETTINGS_SECTIONS = ['General', 'AI Models', 'Interface', 'Backend', 'Updates', 'Advanced']
export function SettingsSidebar({ activeSection, onSelect }) {
return (
{SETTINGS_SECTIONS.map(section => (
onSelect(section)}
>
{section}
))}
)
}
export function SettingsPanel({
activeSection,
onAudioInputDeviceChange,
onAudioInputLanguageChange,
onBackendApiUrlChange,
onLibrariesPurged,
onModelChange,
onStreamOutputChange,
onTranscriptionModelChange,
onVisionModelChange,
onWorkflowRouterModelChange,
onWorkflowSelectionModeChange,
searxEngines,
searxUrl,
setSearxEngines,
setSearxUrl,
streamOutput,
}) {
return (
<>
{activeSection} Settings
{activeSection === 'General' && (
)}
{activeSection === 'AI Models' && (
)}
{activeSection === 'Interface' && (
)}
{activeSection === 'Backend' && (
setSearxEngines(normalizeWebsearchEngines(next))}
/>
)}
{activeSection === 'Updates' && (
)}
{activeSection === 'Advanced' && (
)}
>
)
}