File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
12
12
ClientRequest ,
13
13
ProgressNotificationSchema ,
14
14
ServerNotification ,
15
+ EmptyResultSchema ,
15
16
} from "mcp-typescript/types.js" ;
16
17
import { useState , useRef } from "react" ;
17
18
import {
@@ -43,6 +44,7 @@ import ToolsTab from "./components/ToolsTab";
43
44
import { AnyZodObject } from "zod" ;
44
45
import HistoryAndNotifications from "./components/History" ;
45
46
import "./App.css" ;
47
+ import PingTab from "./components/PingTab" ;
46
48
47
49
const App = ( ) => {
48
50
const [ connectionStatus , setConnectionStatus ] = useState <
@@ -294,6 +296,10 @@ const App = () => {
294
296
< Terminal className = "w-4 h-4 mr-2" />
295
297
Console
296
298
</ TabsTrigger >
299
+ < TabsTrigger value = "ping" >
300
+ < Bell className = "w-4 h-4 mr-2" />
301
+ Ping
302
+ </ TabsTrigger >
297
303
</ TabsList >
298
304
299
305
< div className = "w-full" >
@@ -332,6 +338,16 @@ const App = () => {
332
338
error = { error }
333
339
/>
334
340
< ConsoleTab />
341
+ < PingTab
342
+ onPingClick = { ( ) => {
343
+ void makeRequest (
344
+ {
345
+ method : "ping" as const ,
346
+ } ,
347
+ EmptyResultSchema ,
348
+ ) ;
349
+ } }
350
+ />
335
351
</ div >
336
352
</ Tabs >
337
353
) : (
Original file line number Diff line number Diff line change
1
+ import { TabsContent } from "@/components/ui/tabs" ;
2
+ import { Button } from "@/components/ui/button" ;
3
+
4
+ const PingTab = ( { onPingClick } : { onPingClick : ( ) => void } ) => {
5
+ return (
6
+ < TabsContent value = "ping" className = "grid grid-cols-2 gap-4" >
7
+ < div className = "col-span-2 flex justify-center items-center" >
8
+ < Button
9
+ onClick = { onPingClick }
10
+ className = "bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white font-bold py-6 px-12 rounded-full shadow-lg transform transition duration-300 hover:scale-110 focus:outline-none focus:ring-4 focus:ring-purple-300 animate-pulse"
11
+ >
12
+ < span className = "text-3xl mr-2" > 🚀</ span >
13
+ Mega Ping
14
+ < span className = "text-3xl ml-2" > 💥</ span >
15
+ </ Button >
16
+ </ div >
17
+ </ TabsContent >
18
+ ) ;
19
+ } ;
20
+
21
+ export default PingTab ;
You can’t perform that action at this time.
0 commit comments