From db0eb67ef1133fd94a2848df2def74d62b1aa1e3 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Mon, 28 Sep 2026 16:23:38 +0200 Subject: [PATCH] ui : move mcp servers to the sidebar rail The add menu keeps to what it attaches to the conversation, so the MCP servers dialog moves to the sidebar rail and its menu entries and the form callback they used go with it. Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash --- .../app/chat/ChatForm/ChatForm.svelte | 7 +-- .../ChatFormActionAddButton.svelte | 4 +- .../ChatFormActionAddSheet.svelte | 14 ------ .../ChatFormActions/ChatFormActions.svelte | 6 --- .../SidebarNavigation.svelte | 5 ++ .../SidebarNavigationActions.svelte | 46 +++++++++++-------- tools/ui/src/lib/constants/ui.constants.ts | 6 +++ tools/ui/src/lib/enums/ui.enums.ts | 2 + tools/ui/src/lib/types/chat.d.ts | 1 - 9 files changed, 42 insertions(+), 49 deletions(-) diff --git a/tools/ui/src/lib/components/app/chat/ChatForm/ChatForm.svelte b/tools/ui/src/lib/components/app/chat/ChatForm/ChatForm.svelte index 893f8077dd..b22db3a395 100644 --- a/tools/ui/src/lib/components/app/chat/ChatForm/ChatForm.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatForm/ChatForm.svelte @@ -8,8 +8,7 @@ ChatFormInputFileInputInvisible, ChatFormMcpResourcesList, ChatFormPickers, - DialogMcpResourcesBrowser, - DialogMcpServers + DialogMcpResourcesBrowser } from '$lib/components/app'; import { CLIPBOARD_CONTENT_QUOTE_PREFIX, @@ -193,7 +192,6 @@ let preSelectedResourceUri = $state(undefined); // MCP Servers Dialog State - let isMcpServersDialogOpen = $state(false); let currentConfig = $derived(settingsStore.config); @@ -628,7 +626,6 @@ isReasoning={chatStore.isReasoning} {isRecording} onFileUpload={handleFileUpload} - onMcpSettingsClick={() => (isMcpServersDialogOpen = true)} onMicClick={handleMicClick} {onStop} onSystemPromptClick={() => onSystemPromptClick?.({ files: uploadedFiles, message: value })} @@ -667,5 +664,3 @@ }} preSelectedUri={preSelectedResourceUri} /> - - diff --git a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte index 60e7bd1d4a..443046615b 100644 --- a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte @@ -15,11 +15,11 @@ {/if} diff --git a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte index 748f062a65..64dde870e2 100644 --- a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte @@ -30,7 +30,6 @@ uploadedFiles?: ChatUploadedFile[]; onFileUpload?: () => void; onMicClick?: () => void; - onMcpSettingsClick?: () => void; onStop?: () => void; onSystemPromptClick?: () => void; } @@ -44,7 +43,6 @@ isReasoning = false, isRecording = false, onFileUpload, - onMcpSettingsClick, onMicClick, onStop, onSystemPromptClick, @@ -136,10 +134,6 @@ get onFileUpload() { return onFileUpload; }, - - get onMcpSettingsClick() { - return onMcpSettingsClick; - }, get onSystemPromptClick() { return onSystemPromptClick; } diff --git a/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte b/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte index f2b1faa5a8..613348c045 100644 --- a/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte +++ b/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte @@ -6,6 +6,7 @@ ActionIcon, DialogConversationRename, DialogManageModels, + DialogMcpServers, DialogSettingsChat, Logo, SidebarNavigationActions, @@ -94,6 +95,7 @@ let renameDialogOpen = $state(false); let settingsDialogOpen = $state(false); + let mcpDialogOpen = $state(false); let renameTargetConversationId = $state(null); let renameDraft = $state(''); let renameOriginalTitle = $state(''); @@ -391,6 +393,7 @@ class="px-2" isExpandedMode={innerWidth > 768 ? uiStore.isSidebarExpanded : true} onManageModelsClick={() => uiStore.openModelsManager()} + onMcpClick={() => (mcpDialogOpen = true)} onNewChat={() => { if (deviceStore.isMobile) { scheduleMobileCollapse(); @@ -454,6 +457,8 @@ + +