feat: Reorganize settings sections

This commit is contained in:
Aleksander Grygier 2026-03-31 19:14:01 +02:00
parent 4ddda29eee
commit 9c922bae32
6 changed files with 106 additions and 108 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@
<div style="display: contents">
<script>
{
__sveltekit_n1bw2f = {
__sveltekit_pcz11y = {
base: new URL('.', location).pathname.slice(0, -1)
};

View File

@ -7,7 +7,8 @@
Monitor,
ChevronLeft,
ChevronRight,
Database
Database,
ListRestart
} from '@lucide/svelte';
import {
ChatSettingsFooter,
@ -257,17 +258,12 @@
]
},
{
title: SETTINGS_SECTION_TITLES.IMPORT_EXPORT,
icon: Database,
fields: []
},
{
title: SETTINGS_SECTION_TITLES.MCP,
icon: McpLogo,
title: SETTINGS_SECTION_TITLES.AGENTIC,
icon: ListRestart,
fields: [
{
key: SETTINGS_KEYS.AGENTIC_MAX_TURNS,
label: 'Agentic loop max turns',
label: 'Agentic turns',
type: SettingsFieldType.INPUT
},
{
@ -287,6 +283,16 @@
}
]
},
{
title: SETTINGS_SECTION_TITLES.IMPORT_EXPORT,
icon: Database,
fields: []
},
{
title: SETTINGS_SECTION_TITLES.MCP,
icon: McpLogo,
fields: []
},
{
title: SETTINGS_SECTION_TITLES.DEVELOPER,
icon: Code,
@ -526,19 +532,10 @@
{#if currentSection.title === SETTINGS_SECTION_TITLES.IMPORT_EXPORT}
<ChatSettingsImportExportTab />
{:else if currentSection.title === SETTINGS_SECTION_TITLES.MCP}
<div class="space-y-6">
<ChatSettingsFields
fields={currentSection.fields}
{localConfig}
onConfigChange={handleConfigChange}
onThemeChange={handleThemeChange}
/>
<McpServersSettings />
{/if}
<div class="border-t border-border/30 pt-6">
<McpServersSettings />
</div>
</div>
{:else}
{#if currentSection.fields}
<div class="space-y-6">
<ChatSettingsFields
fields={currentSection.fields}
@ -550,7 +547,7 @@
{/if}
</div>
<div class="mt-8 border-t pt-6">
<div class="mt-8 border-t border-border/30 pt-6">
<p class="text-xs text-muted-foreground">Settings are saved in browser's localStorage</p>
</div>
</div>

View File

@ -70,7 +70,7 @@
{/if}
</div>
<div class="relative w-full md:max-w-md">
<div class="relative w-full">
<Input
id={field.key}
value={currentValue}
@ -176,7 +176,7 @@
}
}}
>
<div class="relative w-full md:w-auto md:max-w-md">
<div class="relative w-full md:w-auto">
<Select.Trigger class="w-full">
<div class="flex items-center gap-2">
{#if selectedOption?.icon}

View File

@ -10,6 +10,7 @@ export const SETTINGS_SECTION_TITLES = {
SAMPLING: 'Sampling',
PENALTIES: 'Penalties',
IMPORT_EXPORT: 'Import/Export',
AGENTIC: 'Agentic',
MCP: 'MCP',
DEVELOPER: 'Developer'
} as const;