diff --git a/client/src/App.tsx b/client/src/App.tsx index cd03714..2061e30 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 { @@ -43,6 +44,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< @@ -294,6 +296,10 @@ const App = () => { Console + + + Ping +
@@ -332,6 +338,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..f159284 --- /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;