@@ -10,6 +10,7 @@ import {
1010 EyeOff ,
1111 RotateCcw ,
1212 Settings ,
13+ RefreshCwOff ,
1314} from "lucide-react" ;
1415import { Button } from "@/components/ui/button" ;
1516import { Input } from "@/components/ui/input" ;
@@ -45,6 +46,7 @@ interface SidebarProps {
4546 bearerToken : string ;
4647 setBearerToken : ( token : string ) => void ;
4748 onConnect : ( ) => void ;
49+ onDisconnect : ( ) => void ;
4850 stdErrNotifications : StdErrNotification [ ] ;
4951 logLevel : LoggingLevel ;
5052 sendLogLevelRequest : ( level : LoggingLevel ) => void ;
@@ -68,6 +70,7 @@ const Sidebar = ({
6870 bearerToken,
6971 setBearerToken,
7072 onConnect,
73+ onDisconnect,
7174 stdErrNotifications,
7275 logLevel,
7376 sendLogLevelRequest,
@@ -375,19 +378,24 @@ const Sidebar = ({
375378 </ div >
376379
377380 < div className = "space-y-2" >
378- < Button className = "w-full" onClick = { onConnect } >
379- { connectionStatus === "connected" ? (
380- < >
381+ { connectionStatus === "connected" && (
382+ < div className = "grid grid-cols-2 gap-4" >
383+ < Button onClick = { onConnect } >
381384 < RotateCcw className = "w-4 h-4 mr-2" />
382385 { transportType === "stdio" ? "Restart" : "Reconnect" }
383- </ >
384- ) : (
385- < >
386- < Play className = "w-4 h-4 mr-2" />
387- Connect
388- </ >
389- ) }
390- </ Button >
386+ </ Button >
387+ < Button onClick = { onDisconnect } >
388+ < RefreshCwOff className = "w-4 h-4 mr-2" />
389+ Disconnect
390+ </ Button >
391+ </ div >
392+ ) }
393+ { connectionStatus !== "connected" && (
394+ < Button className = "w-full" onClick = { onConnect } >
395+ < Play className = "w-4 h-4 mr-2" />
396+ Connect
397+ </ Button >
398+ ) }
391399
392400 < div className = "flex items-center justify-center space-x-2 mb-4" >
393401 < div
0 commit comments