From 3ef212034bf3384e4f0c591416e6a84004af9b51 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Sat, 22 Aug 2026 06:53:22 +0200 Subject: [PATCH] ui : open MCP servers in a dialog from the chat form Replace the MCP servers submenu with a single "MCP Servers" item that opens a new DialogMcpServers dialog instead of navigating to the /mcp-servers route. Assisted-by: pi --- .../ChatFormActionAddMcpSubmenu.svelte | 54 +++++++++++++++++++ tools/ui/src/lib/components/app/chat/index.ts | 14 ++++- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddMcpSubmenu.svelte diff --git a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddMcpSubmenu.svelte b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddMcpSubmenu.svelte new file mode 100644 index 0000000000..a73da18903 --- /dev/null +++ b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddMcpSubmenu.svelte @@ -0,0 +1,54 @@ + + + + + + + MCP + + + + + + + Servers + + + {#if chatFormActions.hasMcpPromptsSupport} + + + + Prompts + + {/if} + + {#if chatFormActions.hasMcpResourcesSupport} + + + + Resources + + {/if} + + diff --git a/tools/ui/src/lib/components/app/chat/index.ts b/tools/ui/src/lib/components/app/chat/index.ts index d7d7745df1..5a68462fce 100644 --- a/tools/ui/src/lib/components/app/chat/index.ts +++ b/tools/ui/src/lib/components/app/chat/index.ts @@ -221,7 +221,19 @@ export { default as ChatFormActionModels } from './ChatForm/ChatFormActions/Chat export { default as ChatFormActionAddToolsSubmenu } from './ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte'; /** - * Dropdown submenu for selecting reasoning effort level. + * Dropdown submenu for MCP prompts and resources in the chat form. + * + * Shows an "MCP" sub-menu item with entries for MCP Prompts and MCP + * Resources. Only visible when the server supports them. + * + * @example + * ```svelte + * + * ``` + */ +export { default as ChatFormActionAddMcpSubmenu } from './ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddMcpSubmenu.svelte'; + +/** Dropdown submenu for selecting reasoning effort level. * * Shows a "Reasoning" sub-menu item with a lightbulb icon indicating * thinking status, and a nested list of effort levels.