feat: Add resource_link content type support to ToolResults component

Add ResourceLinkView component for displaying resource links
This commit is contained in:
Nandha Reddy 2025-06-26 20:22:28 +10:00
commit c4587bafb8
No known key found for this signature in database
GPG key ID: 09ED40FC0F563333

View file

@ -360,4 +360,29 @@ describe("ToolsTab", () => {
).not.toBeInTheDocument();
});
});
describe("Resource Link Content Type", () => {
it("should render resource_link content type", () => {
const result = {
content: [
{
type: "resource_link",
uri: "https://example.com/resource",
name: "Test Resource",
description: "A test resource",
mimeType: "application/json",
},
],
};
renderToolsTab({ selectedTool: mockTools[0], toolResult: result });
expect(
screen.getByText("https://example.com/resource"),
).toBeInTheDocument();
expect(screen.getByText("Test Resource")).toBeInTheDocument();
expect(screen.getByText("A test resource")).toBeInTheDocument();
expect(screen.getByText("application/json")).toBeInTheDocument();
});
});
});