Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/app/src/components/dialog-select-mcp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { pathKey } from "@/utils/path-key"

const statusLabels = {
connected: "mcp.status.connected",
connecting: "mcp.status.connecting",
failed: "mcp.status.failed",
needs_auth: "mcp.status.needs_auth",
needs_client_registration: "mcp.status.needs_client_registration",
Expand Down Expand Up @@ -79,6 +80,7 @@ export const DialogSelectMcp: Component = () => {
if (s?.status === "failed" || s?.status === "needs_client_registration") return s.error
}
const enabled = () => status() === "connected"
const connecting = () => status() === "connecting"
return (
<div class="w-full flex items-center justify-between gap-x-3">
<div class="flex flex-col gap-0.5 min-w-0">
Expand All @@ -95,8 +97,9 @@ export const DialogSelectMcp: Component = () => {
<div onClick={(e) => e.stopPropagation()}>
<Switch
checked={enabled()}
disabled={toggle.isPending && toggle.variables === i.name}
disabled={connecting() || (toggle.isPending && toggle.variables === i.name)}
onChange={() => {
if (connecting()) return
if (toggle.isPending) return
toggle.mutate(i.name)
}}
Expand Down
Loading
Loading