]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ui: fix MCP server display name conflicts in tools lists (#26011)
authorPascal <redacted>
Fri, 24 Jul 2026 17:28:14 +0000 (19:28 +0200)
committerGitHub <redacted>
Fri, 24 Jul 2026 17:28:14 +0000 (19:28 +0200)
commit95a923a64c7d493ed1cb347d3b55d039fa3b8097
tree1118d2ee742fdee21b7ca9f51196fae567dba2cc
parent27209a598da5b9eb18cbf274e4e9b3367526b114
ui: fix MCP server display name conflicts in tools lists (#26011)

* ui: fix MCP server display name conflicts in tools lists

Tool groups were keyed by display label so two servers reporting
the same name broke the keyed each blocks and only one was visible.
Key rendering, expand state and toggles by the stable server id
instead, and suffix duplicate labels with a counter in config order.

* ui: customizable MCP server display name with autofill

Add a display name field to the MCP server form, add and edit alike.
The custom name takes precedence over the server-reported one, so two
servers reporting the same name can be told apart; clearing the field
returns to the automatic label. In the add dialog a debounced preview
handshake prefills the field with the server-reported name: a manual
edit freezes the autofill, stale responses are discarded, failures
stay silent, and an unedited prefill is not persisted so the label
keeps following the server.

* ui: fix recursive fetch passthrough in the client test setup

The original fetch was captured inside beforeEach, where it is the
previous test's spy since vi.spyOn returns the existing one, so the
default passthrough recursed on itself for any URL outside the
mocked set. Capture the real fetch once at module load.
15 files changed:
tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddSheet.svelte
tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte
tools/ui/src/lib/components/app/dialogs/DialogMcpServerAddNew.svelte
tools/ui/src/lib/components/app/mcp/McpServerCard/McpServerCard.svelte
tools/ui/src/lib/components/app/mcp/McpServerCard/McpServerCardEditForm.svelte
tools/ui/src/lib/components/app/mcp/McpServerForm.svelte
tools/ui/src/lib/components/app/settings/SettingsChat/SettingsChatToolsTab.svelte
tools/ui/src/lib/hooks/use-tools-panel.svelte.ts
tools/ui/src/lib/stores/mcp.svelte.ts
tools/ui/src/lib/stores/tools.svelte.ts
tools/ui/src/lib/types/mcp.d.ts
tools/ui/src/lib/types/tools.d.ts
tools/ui/src/lib/utils/mcp.ts
tools/ui/tests/client/mcp-display-name.svelte.test.ts [new file with mode: 0644]
tools/ui/vitest-setup-client.ts