From fb5e464fe70426a5a877a8bf4be960e371a1027a Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Fri, 2 Jan 2026 19:37:41 +0100 Subject: [PATCH] feat: Display and manage servers in ChatForm actions --- .../ChatFormActionFileAttachments.svelte | 52 +++-- .../ChatFormActions/ChatFormActions.svelte | 194 +++++++++++++++++- 2 files changed, 209 insertions(+), 37 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 3545b4aebf..3666849e8f 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 @@ -1,18 +1,20 @@
@@ -41,9 +44,9 @@ {disabled} type="button" > - Attach files + {fileUploadTooltipText} - + @@ -121,23 +124,18 @@ {/if} - - - - onSystemPromptClick?.()} - > - - System Prompt - - + {#if showMcpOption} + + onMcpClick?.()} + > + - -

Add a custom system message for this conversation

-
-
+ 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 c621a69e05..38b78a5377 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 @@ -1,20 +1,33 @@
- +
+ (showMcpDialog = true)} + {onFileUpload} + /> + + {#if hasMcpServers} + + + + + + +
+ {#each mcpServers as server (server.id)} + {@const healthState = mcpGetHealthCheckState(server.id)} + {@const hasError = healthState.status === 'error'} +
+
+ {#if getFaviconUrl(server)} + { + (e.currentTarget as HTMLImageElement).style.display = 'none'; + }} + /> + {/if} + {getServerDisplayName(server)} + {#if hasError} + Error + {/if} +
+ toggleServer(server.id, checked)} + disabled={hasError} + /> +
+ {/each} +
+ + (showMcpDialog = true)} + > + + Manage MCP Servers + +
+
+ {/if} +
{/if}
+ + (showMcpDialog = open)} +/>