Upgrade to MCP-UI ~5.6.2 and handle internalized auto iframe resizing (#3889)
This commit is contained in:
@@ -49,24 +49,19 @@ export default function ToolCallWithResponse({
|
||||
</div>
|
||||
{/* MCP UI — Inline */}
|
||||
{toolResponse?.toolResult?.value &&
|
||||
toolResponse.toolResult.value.map((content, index, results) => {
|
||||
toolResponse.toolResult.value.map((content, index) => {
|
||||
if (content.type === 'resource' && content.resource.uri?.startsWith('ui://')) {
|
||||
if (index === results.length - 1) {
|
||||
return (
|
||||
<>
|
||||
<MCPUIResourceRenderer key={`${content.type}-${index}`} content={content} />
|
||||
{/* Append a disclaimer if this is the last item in the array */}
|
||||
<div className="mt-3 p-4 py-3 border border-borderSubtle rounded-lg bg-background-muted flex items-center">
|
||||
<FlaskConical className="mr-2" size={20} />
|
||||
<div className="text-sm font-medium mono">
|
||||
MCP UI is experimental and may change at any time.
|
||||
</div>
|
||||
return (
|
||||
<div key={`${content.type}-${index}`} className="mt-3">
|
||||
<MCPUIResourceRenderer content={content} />
|
||||
<div className="mt-3 p-4 py-3 border border-borderSubtle rounded-lg bg-background-muted flex items-center">
|
||||
<FlaskConical className="mr-2" size={20} />
|
||||
<div className="text-sm font-medium mono">
|
||||
MCP UI is experimental and may change at any time.
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
return <MCPUIResourceRenderer key={`${content.type}-${index}`} content={content} />;
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user