From de40f3e81b6d79052d6f5508540ab3580cd4c872 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Sat, 15 Aug 2026 08:36:17 +0200 Subject: [PATCH] ui : rework the settings registry into ordered raw-data sections SETTINGS_REGISTRY becomes an ordered SettingsSectionEntry[] array; the array order is the sidebar display order. Section titles, color mode options and title radio options are declared inline in their section or entry. Entries gain showInUi; MCP servers, the system-message toggle and the title LLM flag become hidden entries of their own section. Derived values (config defaults, help info, chat sections, numeric field lists, syncable parameters) are still derived here; they move to their actual consumers in follow-up commits. --- .../settings/SettingsChat/SettingsChat.svelte | 8 +- tools/ui/src/lib/constants/index.ts | 2 +- .../ui/src/lib/constants/routes.constants.ts | 12 - ...try.constants.ts => settings.constants.ts} | 813 +++++++++--------- tools/ui/src/lib/types/settings.d.ts | 4 +- 5 files changed, 422 insertions(+), 417 deletions(-) rename tools/ui/src/lib/constants/{settings-registry.constants.ts => settings.constants.ts} (84%) diff --git a/tools/ui/src/lib/components/app/settings/SettingsChat/SettingsChat.svelte b/tools/ui/src/lib/components/app/settings/SettingsChat/SettingsChat.svelte index 4233039eff..67e0e879a6 100644 --- a/tools/ui/src/lib/components/app/settings/SettingsChat/SettingsChat.svelte +++ b/tools/ui/src/lib/components/app/settings/SettingsChat/SettingsChat.svelte @@ -15,7 +15,7 @@ NUMERIC_FIELDS, POSITIVE_INTEGER_FIELDS, SETTINGS_CHAT_SECTIONS, - SETTINGS_SECTION_TITLES + SETTINGS_SECTION_SLUGS } from '$lib/constants'; import { ColorMode } from '$lib/enums/ui.enums'; import { RouterService } from '$lib/services/router.service'; @@ -148,9 +148,9 @@

{currentSection.title}

- {#if currentSection.title === SETTINGS_SECTION_TITLES.TOOLS} + {#if currentSection.slug === SETTINGS_SECTION_SLUGS.TOOLS} - {:else if currentSection.title === SETTINGS_SECTION_TITLES.IMPORT_EXPORT} + {:else if currentSection.slug === SETTINGS_SECTION_SLUGS.IMPORT_EXPORT} {:else if currentSection.fields}
@@ -161,7 +161,7 @@ onThemeChange={handleThemeChange} /> - {#if currentSection.title === SETTINGS_SECTION_TITLES.GENERAL} + {#if currentSection.slug === SETTINGS_SECTION_SLUGS.GENERAL}