From b94ca41c9f4a5cea1401f81aa30ed3944bc16f0d Mon Sep 17 00:00:00 2001 From: Andrew Harvard Date: Wed, 7 Jan 2026 09:21:45 -0500 Subject: [PATCH] fix: update MCP Apps _meta.ui.resourceUri to use nested format (SEP-1865) Fixes #6364 The draft spec SEP-1865 expects `_meta.ui.resourceUri` (nested object) but goose was expecting `_meta['ui/resourceUri']` (flat key with slash), which prevented MCP Apps UI from rendering. Updated ToolCallWithResponse.tsx to use the correct nested format. --- .../src/components/ToolCallWithResponse.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ui/desktop/src/components/ToolCallWithResponse.tsx b/ui/desktop/src/components/ToolCallWithResponse.tsx index 77216979dd70..46503c6c91e8 100644 --- a/ui/desktop/src/components/ToolCallWithResponse.tsx +++ b/ui/desktop/src/components/ToolCallWithResponse.tsx @@ -24,19 +24,21 @@ interface ToolGraphNode { depends_on: number[]; } +type UiMeta = { + ui?: { + resourceUri?: string; + }; +}; + type ToolResultWithMeta = { status?: string; value?: CallToolResponse & { - _meta?: { - 'ui/resourceUri'?: string; - }; + _meta?: UiMeta; }; }; type ToolRequestWithMeta = ToolRequestMessageContent & { - _meta?: { - 'ui/resourceUri'?: string; - }; + _meta?: UiMeta; toolCall: { status: 'success'; value: { @@ -78,12 +80,12 @@ function maybeRenderMCPApp( append?: (value: string) => void ): React.ReactNode { const requestWithMeta = toolRequest as ToolRequestWithMeta; - let resourceUri = requestWithMeta._meta?.['ui/resourceUri']; + let resourceUri = requestWithMeta._meta?.ui?.resourceUri; if (!resourceUri && toolResponse) { const resultWithMeta = toolResponse.toolResult as ToolResultWithMeta; if (resultWithMeta?.status === 'success' && resultWithMeta.value) { - resourceUri = resultWithMeta.value._meta?.['ui/resourceUri']; + resourceUri = resultWithMeta.value._meta?.ui?.resourceUri; } }