From bc07e0723d2fecd4435b22b87343c931cffbcdce Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Wed, 7 Jan 2026 00:15:52 +0100 Subject: [PATCH] feat: Always show Mcp Selector --- .../ChatFormActionFileAttachments.svelte | 19 +------------------ .../ChatFormActions/ChatFormActions.svelte | 11 +---------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionFileAttachments.svelte b/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionFileAttachments.svelte index 748c55403f..3f23a9c9c6 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionFileAttachments.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionFileAttachments.svelte @@ -5,16 +5,13 @@ import * as Tooltip from '$lib/components/ui/tooltip'; import { FILE_TYPE_ICONS } from '$lib/constants/icons'; import { FileTypeCategory } from '$lib/enums'; - import McpLogo from '$lib/components/app/misc/McpLogo.svelte'; interface Props { class?: string; disabled?: boolean; hasAudioModality?: boolean; hasVisionModality?: boolean; - showMcpOption?: boolean; onFileUpload?: (fileType?: FileTypeCategory) => void; - onMcpClick?: () => void; onSystemPromptClick?: () => void; } @@ -23,13 +20,11 @@ disabled = false, hasAudioModality = false, hasVisionModality = false, - showMcpOption = false, onFileUpload, - onMcpClick, onSystemPromptClick }: Props = $props(); - const fileUploadTooltipText = 'Add files or MCP servers'; + const fileUploadTooltipText = 'Add files'; function handleFileUpload(fileType?: FileTypeCategory) { onFileUpload?.(fileType); @@ -127,18 +122,6 @@ {/if} - {#if showMcpOption} - - onMcpClick?.()} - > - - - MCP Servers - - {/if} - diff --git a/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte b/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte index 54c8d2a2a8..28cac01a8f 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte @@ -17,7 +17,6 @@ import { chatStore } from '$lib/stores/chat.svelte'; import { activeMessages, usedModalities } from '$lib/stores/conversations.svelte'; import { useModelChangeValidation } from '$lib/hooks/use-model-change-validation.svelte'; - import { parseMcpServerSettings } from '$lib/config/mcp'; interface Props { canSend?: boolean; @@ -168,10 +167,6 @@ }); let showMcpDialog = $state(false); - - // MCP servers state (simplified - just need to check if any exist) - let mcpServers = $derived(parseMcpServerSettings(currentConfig.mcpServers)); - let hasMcpServers = $derived(mcpServers.length > 0);
@@ -180,15 +175,11 @@ {disabled} {hasAudioModality} {hasVisionModality} - showMcpOption={!hasMcpServers} - onMcpClick={() => (showMcpDialog = true)} {onFileUpload} {onSystemPromptClick} /> - {#if hasMcpServers} - (showMcpDialog = true)} /> - {/if} + (showMcpDialog = true)} />