Commit f8fcef254 for llama.cpp
commit f8fcef25460d1a709eb8b8519f045940e7c9607f
Author: Aleksander Grygier <aleksander.grygier@gmail.com>
Date: Thu Oct 29 09:15:09 2026 +0100
ui: add MCP group checkboxes in tools settings and fix indeterminate checkbox colors (#31303)
MCP server groups in the settings Tools tab now get a group checkbox like the
built-in, server and browser groups, toggling the server-scoped tools key.
Indeterminate checkboxes now use the checked state colors.
Assisted-by: Claude (Opus 5.5 Medium)
diff --git a/tools/ui/src/lib/components/app/settings/SettingsChat/SettingsChatToolsTab.svelte b/tools/ui/src/lib/components/app/settings/SettingsChat/SettingsChatToolsTab.svelte
index 4c07553bc..987fcaeb9 100644
--- a/tools/ui/src/lib/components/app/settings/SettingsChat/SettingsChatToolsTab.svelte
+++ b/tools/ui/src/lib/components/app/settings/SettingsChat/SettingsChatToolsTab.svelte
@@ -41,16 +41,21 @@
<ChevronRight class="h-3.5 w-3.5 shrink-0" />
{/if}
- {@const isCategoryEnabled =
- group.source !== ToolSource.MCP && toolsStore.isCategoryEnabled(group.source)}
-
- {#if group.source !== ToolSource.MCP}
- <Checkbox
- checked={isCategoryEnabled}
- onCheckedChange={() => toolsStore.toggleCategory(group.source)}
- onclick={(e) => e.stopPropagation()}
- />
- {/if}
+ {@const groupToggleKey =
+ group.source === ToolSource.MCP && group.serverId
+ ? toolsStore.getMcpServerToolsKey(group.serverId)
+ : null}
+
+ <Checkbox
+ checked={groupToggleKey
+ ? toolsStore.isToolEnabled(groupToggleKey)
+ : toolsStore.isCategoryEnabled(group.source)}
+ onCheckedChange={() =>
+ groupToggleKey
+ ? toolsStore.toggleTool(groupToggleKey)
+ : toolsStore.toggleCategory(group.source)}
+ onclick={(e) => e.stopPropagation()}
+ />
{@const faviconUrl = group.serverId ? mcpStore.getServerFavicon(group.serverId) : null}
diff --git a/tools/ui/src/lib/components/ui/checkbox/checkbox.svelte b/tools/ui/src/lib/components/ui/checkbox/checkbox.svelte
index 60ef646fc..6f9cfe28e 100644
--- a/tools/ui/src/lib/components/ui/checkbox/checkbox.svelte
+++ b/tools/ui/src/lib/components/ui/checkbox/checkbox.svelte
@@ -18,7 +18,7 @@
bind:indeterminate
bind:ref
class={cn(
- 'peer flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input bg-background shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary',
+ 'peer flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input bg-background shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary dark:data-[state=indeterminate]:bg-primary',
className
)}
data-slot="checkbox"