Skip to content

Commit 4a2ba7c

Browse files
authored
Merge pull request modelcontextprotocol#290 from cliffhall/fix-reconnect
Fix Reconnect handler
2 parents a3a1ad4 + 4f6c309 commit 4a2ba7c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

client/src/components/Sidebar.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,13 @@ const Sidebar = ({
431431
<div className="space-y-2">
432432
{connectionStatus === "connected" && (
433433
<div className="grid grid-cols-2 gap-4">
434-
<Button data-testid="connect-button" onClick={onConnect}>
434+
<Button
435+
data-testid="connect-button"
436+
onClick={() => {
437+
onDisconnect();
438+
onConnect();
439+
}}
440+
>
435441
<RotateCcw className="w-4 h-4 mr-2" />
436442
{transportType === "stdio" ? "Restart" : "Reconnect"}
437443
</Button>

0 commit comments

Comments
 (0)