From 4324573f16b5ce888c9baf235188d7bcfe4b5f51 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Fri, 23 Oct 2026 03:46:52 +0200 Subject: [PATCH] fix: Valves pickers in Chat Controls show while tools and functions are off (#32959) With tools or functions turned off for the instance (ENABLE_TOOLS, ENABLE_FUNCTIONS), Chat Controls still offered both under Valves, and the list for the disabled one was always empty. Tools and functions are now only offered there while they are enabled, and the Valves section is hidden when both are off. Refs #32830 --- src/lib/components/chat/Controls/Controls.svelte | 4 ++-- src/lib/components/chat/Controls/Valves.svelte | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/lib/components/chat/Controls/Controls.svelte b/src/lib/components/chat/Controls/Controls.svelte index 743019638f..22ee981fac 100644 --- a/src/lib/components/chat/Controls/Controls.svelte +++ b/src/lib/components/chat/Controls/Controls.svelte @@ -9,7 +9,7 @@ import FileItem from '$lib/components/common/FileItem.svelte'; import Collapsible from '$lib/components/common/Collapsible.svelte'; - import { user, settings } from '$lib/stores'; + import { config, user, settings } from '$lib/stores'; export let models = []; export let chatFiles = []; export let params: Record = {}; @@ -92,7 +92,7 @@ {/if} - {#if $user?.role === 'admin' || ($user?.permissions.chat?.valves ?? true)} + {#if ($config?.features?.enable_tools || $config?.features?.enable_functions) && ($user?.role === 'admin' || ($user?.permissions.chat?.valves ?? true))} - - + {#if $config?.features?.enable_tools} + + {/if} + {#if $config?.features?.enable_functions} + + {/if}