fix: context compaction threshold shows while context compaction is off (#32962)

Admins saw the Context Compaction Threshold under Advanced Params, in the model editor, the model defaults and the chat settings, even with context compaction turned off, which is the default, and the value did nothing. It is now hidden while context compaction is off. A threshold already saved on a model is kept and applies again once compaction is turned on.

Refs #32830
This commit is contained in:
Classic298 2026-10-23 03:48:38 +02:00 • committed by GitHub
parent 502af86b25
commit 1f737b8948
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,6 +7,7 @@
import type { i18n as i18nType } from 'i18next';
import { getContext } from 'svelte';
import type { Writable } from 'svelte/store';
import { config } from '$lib/stores';
const i18n = getContext<Writable<i18nType>>('i18n');
@ -201,7 +202,9 @@
)}
{/if}
</div>
{/if}
{#if admin && $config?.features?.enable_context_compaction}
<div>
<Tooltip
content={$i18n.t(