feat: Add resource_link content type support to ToolResults component
Add ResourceLinkView component for displaying resource links
This commit is contained in:
parent
5e92e889b8
commit
c4587bafb8
1 changed files with 138 additions and 0 deletions
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue