Compare commits
1 Commits
0.2.4
...
ashwin/res
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cd1dc7dd4 |
@@ -7,6 +7,7 @@ import {
|
||||
ReadResourceResultSchema,
|
||||
CallToolResultSchema,
|
||||
ListPromptsResultSchema,
|
||||
Resource,
|
||||
Tool,
|
||||
ClientRequest,
|
||||
} from "mcp-typescript/types.js";
|
||||
@@ -34,7 +35,7 @@ import {
|
||||
import ConsoleTab from "./components/ConsoleTab";
|
||||
import Sidebar from "./components/Sidebar";
|
||||
import RequestsTab from "./components/RequestsTabs";
|
||||
import ResourcesTab, { Resource } from "./components/ResourcesTab";
|
||||
import ResourcesTab from "./components/ResourcesTab";
|
||||
import NotificationsTab from "./components/NotificationsTab";
|
||||
import PromptsTab, { Prompt } from "./components/PromptsTab";
|
||||
import ToolsTab from "./components/ToolsTab";
|
||||
@@ -108,7 +109,7 @@ const App = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const readResource = async (uri: string) => {
|
||||
const readResource = async (uri: URL) => {
|
||||
const response = await makeRequest(
|
||||
{
|
||||
method: "resources/read" as const,
|
||||
|
||||
@@ -2,13 +2,9 @@ import { FileText, ChevronRight, AlertCircle, RefreshCw } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
|
||||
import { TabsContent } from "@/components/ui/tabs";
|
||||
import { Resource } from "mcp-typescript/types.js";
|
||||
import ListPane from "./ListPane";
|
||||
|
||||
export type Resource = {
|
||||
uri: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
const ResourcesTab = ({
|
||||
resources,
|
||||
listResources,
|
||||
@@ -20,7 +16,7 @@ const ResourcesTab = ({
|
||||
}: {
|
||||
resources: Resource[];
|
||||
listResources: () => void;
|
||||
readResource: (uri: string) => void;
|
||||
readResource: (uri: URL) => void;
|
||||
selectedResource: Resource | null;
|
||||
setSelectedResource: (resource: Resource) => void;
|
||||
resourceContent: string;
|
||||
@@ -37,7 +33,7 @@ const ResourcesTab = ({
|
||||
renderItem={(resource) => (
|
||||
<div className="flex items-center w-full">
|
||||
<FileText className="w-4 h-4 mr-2 flex-shrink-0 text-gray-500" />
|
||||
<span className="flex-1 truncate" title={resource.uri}>
|
||||
<span className="flex-1 truncate" title={resource.uri.toString()}>
|
||||
{resource.name}
|
||||
</span>
|
||||
<ChevronRight className="w-4 h-4 flex-shrink-0 text-gray-400" />
|
||||
|
||||
Reference in New Issue
Block a user