mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-07 20:47:30 +02:00
ui : use merged sampling & penalties section in model selector
Assisted-by: pi
This commit is contained in:
@@ -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 @@
|
||||
|
||||
<ChatFormActionAddReasoningSubmenu />
|
||||
|
||||
{#if samplingSection}
|
||||
<ModelsSelectorSettingsSubmenu section={samplingSection} disabled={!hasModelLoaded} />
|
||||
{/if}
|
||||
|
||||
{#if penaltiesSection}
|
||||
<ModelsSelectorSettingsSubmenu section={penaltiesSection} disabled={!hasModelLoaded} />
|
||||
{#if samplingPenaltiesSection}
|
||||
<ModelsSelectorSettingsSubmenu
|
||||
section={samplingPenaltiesSection}
|
||||
disabled={!hasModelLoaded}
|
||||
/>
|
||||
{/if}
|
||||
</DropdownMenu.Content>
|
||||
</DropdownMenu.Root>
|
||||
|
||||
Reference in New Issue
Block a user