👨‍✈️ chore: Minor MCP-UI Logic Cleanup (#10950)

This commit is contained in:
Dustin Healy 2025-12-12 14:10:57 -08:00 committed by GitHub
parent 959e301f99
commit 5b0cce2e2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 14 deletions

View file

@ -141,8 +141,10 @@ export function formatToolContent(
const resourceText: string[] = [];
if (isUiResource) {
const resourceTextValue = 'text' in item.resource ? item.resource.text : undefined;
const contentToHash = resourceTextValue || item.resource.uri || '';
const contentToHash =
'text' in item.resource && item.resource.text && typeof item.resource.text === 'string'
? item.resource.text
: item.resource.uri;
const resourceId = generateResourceId(contentToHash);
const uiResource: UIResource = {
...item.resource,