File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
packages/core/src/integrations/mcp-server Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -393,9 +393,7 @@ export function extractPromptResultAttributes(result: unknown): Record<string, s
393393
394394 const resultObj = result as Record < string , unknown > ;
395395
396- if ( typeof resultObj . description === 'string' ) {
397- attributes [ MCP_PROMPT_RESULT_DESCRIPTION_ATTRIBUTE ] = resultObj . description ;
398- }
396+ if ( typeof resultObj . description === 'string' ) attributes [ MCP_PROMPT_RESULT_DESCRIPTION_ATTRIBUTE ] = resultObj . description ;
399397
400398 if ( Array . isArray ( resultObj . messages ) ) {
401399 attributes [ MCP_PROMPT_RESULT_MESSAGE_COUNT_ATTRIBUTE ] = resultObj . messages . length ;
@@ -405,15 +403,11 @@ export function extractPromptResultAttributes(result: unknown): Record<string, s
405403 if ( typeof message === 'object' && message !== null ) {
406404 const messageObj = message as Record < string , unknown > ;
407405
408- if ( typeof messageObj . role === 'string' ) {
409- attributes [ MCP_PROMPT_RESULT_MESSAGE_ROLE_ATTRIBUTE ] = messageObj . role ;
410- }
406+ if ( typeof messageObj . role === 'string' ) attributes [ MCP_PROMPT_RESULT_MESSAGE_ROLE_ATTRIBUTE ] = messageObj . role ;
411407
412408 if ( typeof messageObj . content === 'object' && messageObj . content !== null ) {
413409 const content = messageObj . content as Record < string , unknown > ;
414- if ( typeof content . text === 'string' ) {
415- attributes [ MCP_PROMPT_RESULT_MESSAGE_CONTENT_ATTRIBUTE ] = content . text ;
416- }
410+ if ( typeof content . text === 'string' ) attributes [ MCP_PROMPT_RESULT_MESSAGE_CONTENT_ATTRIBUTE ] = content . text ;
417411 }
418412 }
419413 }
You can’t perform that action at this time.
0 commit comments