Commit 8c6418001 for llama.cpp
commit 8c6418001d7cb79e54af692db9d745f76ef21968
Author: Aleksander Grygier <aleksander.grygier@gmail.com>
Date: Thu Nov 26 11:53:21 2026 +0100
ui: read the Enable MCP setting through one getter (#33067)
uiStore.isMcpEnabled and mcpStore.isFeatureEnabled read the same setting. The MCP store's getter stays, and the two callers of the UI store's use it.
Assisted-by: Claude (Opus 5.5 Medium)
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte
index d14f91cb9..d2dff9f82 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte
@@ -6,7 +6,7 @@
import { Check, ChevronDown, ChevronRight, Info, Loader2, PencilRuler } from '@lucide/svelte';
import { ATTACHMENT_MENU_TEXT, CLI_FLAGS, ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
import { useToolsPanel } from '#lib/hooks/use-tools-panel.svelte.ts';
- import { mcpStore, toolsStore, uiStore } from '#lib/stores/index.ts';
+ import { mcpStore, toolsStore } from '#lib/stores/index.ts';
import type { ToolGroup } from '#lib/types/index.ts';
const toolsPanel = useToolsPanel();
@@ -41,7 +41,7 @@
</span>
<!-- only while MCP is on -->
- {#if uiStore.isMcpEnabled}
+ {#if mcpStore.isFeatureEnabled}
<span class="flex gap-2">
<Info class="mt-0.5 {ICON_CLASS_DEFAULT} shrink-0" />
diff --git a/ui/apps/chat/src/lib/hooks/use-tools-panel.svelte.ts b/ui/apps/chat/src/lib/hooks/use-tools-panel.svelte.ts
index 4854e454d..779faac54 100644
--- a/ui/apps/chat/src/lib/hooks/use-tools-panel.svelte.ts
+++ b/ui/apps/chat/src/lib/hooks/use-tools-panel.svelte.ts
@@ -1,6 +1,6 @@
import { CLI_FLAGS } from '#lib/constants/index.ts';
import { ToolSource } from '#lib/enums/index.ts';
-import { conversationsStore, mcpStore, toolsStore, uiStore } from '#lib/stores/index.ts';
+import { conversationsStore, mcpStore, toolsStore } from '#lib/stores/index.ts';
import type { ToolEntry, ToolGroup } from '#lib/types/index.ts';
import { SvelteSet } from 'svelte/reactivity';
@@ -48,7 +48,7 @@ export function useToolsPanel(): UseToolsPanelReturn {
if (toolsStore.toolGroups.length > 0) return null;
// the MCP half only while MCP is on
- const mcpHint = uiStore.isMcpEnabled
+ const mcpHint = mcpStore.isFeatureEnabled
? ' To see MCP Tools you need to add / enable MCP Server(s).'
: '';
diff --git a/ui/apps/chat/src/lib/stores/mcp/index.svelte.ts b/ui/apps/chat/src/lib/stores/mcp/index.svelte.ts
index f0b0c5b17..5af682bd5 100644
--- a/ui/apps/chat/src/lib/stores/mcp/index.svelte.ts
+++ b/ui/apps/chat/src/lib/stores/mcp/index.svelte.ts
@@ -97,7 +97,7 @@ class MCPStore implements McpHealthHost {
);
}
- /** Whether the Enable MCP setting is on. */
+ /** Whether the Enable MCP setting is on. Off by default; while off, no MCP server is connected. */
get isFeatureEnabled(): boolean {
return Boolean(settingsStore.config[SETTINGS_KEYS.ENABLE_MCP]);
}
diff --git a/ui/apps/chat/src/lib/stores/ui.svelte.ts b/ui/apps/chat/src/lib/stores/ui.svelte.ts
index 93c33ee8e..f2c923ab7 100644
--- a/ui/apps/chat/src/lib/stores/ui.svelte.ts
+++ b/ui/apps/chat/src/lib/stores/ui.svelte.ts
@@ -117,11 +117,6 @@ class UiStore {
return Boolean(settingsStore.getConfig(SETTINGS_KEYS.ENABLE_DISCOVER_MODELS));
}
- /** Whether MCP is on. Off by default; while off, no MCP server is connected. */
- get isMcpEnabled(): boolean {
- return Boolean(settingsStore.getConfig(SETTINGS_KEYS.ENABLE_MCP));
- }
-
/** Whether the model details drawer is open. */
get isModelDetailsOpen(): boolean {
return this.modelDetailsFocus !== null;