diff --git a/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettings.svelte b/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettings.svelte index 492538f9fa..6d44b36139 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettings.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettings.svelte @@ -23,6 +23,8 @@ import type { Component } from 'svelte'; import { NUMERIC_FIELDS, POSITIVE_INTEGER_FIELDS } from '$lib/constants/settings-fields'; import { SETTINGS_COLOR_MODES_CONFIG } from '$lib/constants/settings-config'; + import { SETTINGS_SECTION_TITLES } from '$lib/constants/settings-sections'; + import type { SettingsSectionTitle } from '$lib/constants/settings-sections'; interface Props { onSave?: () => void; @@ -33,10 +35,10 @@ const settingSections: Array<{ fields: SettingsFieldConfig[]; icon: Component; - title: string; + title: SettingsSectionTitle; }> = [ { - title: 'General', + title: SETTINGS_SECTION_TITLES.GENERAL, icon: Settings, fields: [ { @@ -80,7 +82,7 @@ ] }, { - title: 'Display', + title: SETTINGS_SECTION_TITLES.DISPLAY, icon: Monitor, fields: [ { @@ -127,7 +129,7 @@ ] }, { - title: 'Sampling', + title: SETTINGS_SECTION_TITLES.SAMPLING, icon: Funnel, fields: [ { @@ -193,7 +195,7 @@ ] }, { - title: 'Penalties', + title: SETTINGS_SECTION_TITLES.PENALTIES, icon: AlertTriangle, fields: [ { @@ -239,12 +241,12 @@ ] }, { - title: 'Import/Export', + title: SETTINGS_SECTION_TITLES.IMPORT_EXPORT, icon: Database, fields: [] }, { - title: 'MCP', + title: SETTINGS_SECTION_TITLES.MCP, icon: McpLogo, fields: [ { @@ -265,7 +267,7 @@ ] }, { - title: 'Developer', + title: SETTINGS_SECTION_TITLES.DEVELOPER, icon: Code, fields: [ { @@ -300,7 +302,7 @@ // } ]; - let activeSection = $state('General'); + let activeSection = $state(SETTINGS_SECTION_TITLES.GENERAL); let currentSection = $derived( settingSections.find((section) => section.title === activeSection) || settingSections[0] ); @@ -487,9 +489,9 @@

{currentSection.title}

- {#if currentSection.title === 'Import/Export'} + {#if currentSection.title === SETTINGS_SECTION_TITLES.IMPORT_EXPORT} - {:else if currentSection.title === 'MCP'} + {:else if currentSection.title === SETTINGS_SECTION_TITLES.MCP}