Skip to content

Commit 18d74f1

Browse files
committed
fix lint
1 parent 507c514 commit 18d74f1

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

packages/core/src/integrations/mcp-server/attributeExtraction.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,26 +392,27 @@ export function extractPromptResultAttributes(result: unknown): Record<string, s
392392
if (typeof result !== 'object' || result === null) return attributes;
393393

394394
const resultObj = result as Record<string, unknown>;
395-
396-
if (typeof resultObj.description === 'string') attributes[MCP_PROMPT_RESULT_DESCRIPTION_ATTRIBUTE] = resultObj.description;
397-
395+
396+
if (typeof resultObj.description === 'string')
397+
attributes[MCP_PROMPT_RESULT_DESCRIPTION_ATTRIBUTE] = resultObj.description;
398+
398399
if (Array.isArray(resultObj.messages)) {
399400
attributes[MCP_PROMPT_RESULT_MESSAGE_COUNT_ATTRIBUTE] = resultObj.messages.length;
400-
401+
401402
if (resultObj.messages.length > 0) {
402403
const message = resultObj.messages[0];
403404
if (typeof message === 'object' && message !== null) {
404405
const messageObj = message as Record<string, unknown>;
405-
406+
406407
if (typeof messageObj.role === 'string') attributes[MCP_PROMPT_RESULT_MESSAGE_ROLE_ATTRIBUTE] = messageObj.role;
407-
408+
408409
if (typeof messageObj.content === 'object' && messageObj.content !== null) {
409410
const content = messageObj.content as Record<string, unknown>;
410411
if (typeof content.text === 'string') attributes[MCP_PROMPT_RESULT_MESSAGE_CONTENT_ATTRIBUTE] = content.text;
411412
}
412413
}
413414
}
414415
}
415-
416+
416417
return attributes;
417418
}

packages/core/test/lib/integrations/mcp-server/semanticConventions.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,5 @@ describe('MCP Server Semantic Conventions', () => {
506506
expect(setStatusSpy).not.toHaveBeenCalled();
507507
expect(endSpy).toHaveBeenCalled();
508508
});
509-
510-
511509
});
512510
});

0 commit comments

Comments
 (0)