diff --git a/client/src/App.tsx b/client/src/App.tsx index 1660689..4226d13 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -12,6 +12,7 @@ import { ClientRequest, ProgressNotificationSchema, ServerNotification, + EmptyResultSchema, } from "mcp-typescript/types.js"; import { useState, useRef } from "react"; import { @@ -42,6 +43,7 @@ import ToolsTab from "./components/ToolsTab"; import { AnyZodObject } from "zod"; import HistoryAndNotifications from "./components/History"; import "./App.css"; +import PingTab from "./components/PingTab"; const App = () => { const [connectionStatus, setConnectionStatus] = useState< @@ -293,6 +295,10 @@ const App = () => { Console + + + Ping +
@@ -331,6 +337,16 @@ const App = () => { error={error} /> + { + void makeRequest( + { + method: "ping" as const, + }, + EmptyResultSchema, + ); + }} + />
) : ( diff --git a/client/src/components/PingTab.tsx b/client/src/components/PingTab.tsx new file mode 100644 index 0000000..e963a26 --- /dev/null +++ b/client/src/components/PingTab.tsx @@ -0,0 +1,21 @@ +import { TabsContent } from "@/components/ui/tabs"; +import { Button } from "@/components/ui/button"; + +const PingTab = ({ onPingClick }: { onPingClick: () => void }) => { + return ( + +
+ +
+
+ ); +}; + +export default PingTab;