From 4fa82dc623e0ea75be203e6f8cb620e55bf71776 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Fri, 21 Aug 2026 10:49:08 +0200 Subject: [PATCH] ui : use merged sampling & penalties section in model selector Assisted-by: pi --- .../app/models/ModelsSelectorDropdown.svelte | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/tools/ui/src/lib/components/app/models/ModelsSelectorDropdown.svelte b/tools/ui/src/lib/components/app/models/ModelsSelectorDropdown.svelte index 1fd7292161..f885fc0a75 100644 --- a/tools/ui/src/lib/components/app/models/ModelsSelectorDropdown.svelte +++ b/tools/ui/src/lib/components/app/models/ModelsSelectorDropdown.svelte @@ -72,17 +72,14 @@ const reasoning = useReasoningMenu(); - const samplingSection = $derived( - SETTINGS_CHAT_SECTIONS.find((s) => s.slug === SETTINGS_SECTION_SLUGS.SAMPLING) - ); - const penaltiesSection = $derived( - SETTINGS_CHAT_SECTIONS.find((s) => s.slug === SETTINGS_SECTION_SLUGS.PENALTIES) - ); - // Sampling/penalties need a loaded model to show server defaults, so - // disable the submenus until one is loaded. + // disable the submenu until one is loaded. const hasModelLoaded = $derived(modelsStore.loadedModelIds.length > 0); + const samplingPenaltiesSection = $derived( + SETTINGS_CHAT_SECTIONS.find((s) => s.slug === SETTINGS_SECTION_SLUGS.SAMPLING_PENALTIES) + ); + const showOrgNameInTrigger = $derived( settingsStore.config[SETTINGS_KEYS.SHOW_MODEL_ORG_NAME_IN_TRIGGER] ?? false ); @@ -370,12 +367,11 @@ - {#if samplingSection} - - {/if} - - {#if penaltiesSection} - + {#if samplingPenaltiesSection} + {/if}