Skip to content

Commit cd9e284

Browse files
committed
Disable non-installed clients
Signed-off-by: Trung Nguyen <[email protected]>
1 parent e4f6e08 commit cd9e284

File tree

1 file changed

+31
-18
lines changed

1 file changed

+31
-18
lines changed

src/extension/ui/src/components/tabs/YourClients.tsx

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@ import {
1616
ListItem,
1717
ListItemText,
1818
Stack,
19+
Tooltip,
1920
Typography,
2021
} from '@mui/material';
2122
import { useState } from 'react';
2223

2324
import ChatGPTIcon from '../../assets/chatgpt.svg';
2425
import ClaudeIcon from '../../assets/claude-ai-icon.svg';
26+
import ContinueIcon from '../../assets/continue.svg';
2527
import CursorIcon from '../../assets/cursor.svg';
2628
import GordonIcon from '../../assets/gordon-icon.png';
2729
import WindsurfIcon from '../../assets/windsurf.svg';
28-
import ContinueIcon from '../../assets/continue.svg';
2930
import { CATALOG_LAYOUT_SX, DOCKER_MCP_COMMAND } from '../../Constants';
3031

3132
// Initialize the Docker Desktop client
@@ -175,23 +176,34 @@ function ClientSetting({
175176
}
176177
title={<Typography variant="subtitle2">{name}</Typography>}
177178
subheader={
178-
<Typography
179-
variant="body2"
180-
sx={{
181-
color: 'text.secondary',
182-
alignItems: 'center',
183-
display: 'flex',
184-
cursor: 'pointer',
185-
}}
186-
onClick={() => setExpanded(!expanded)}
187-
>
188-
Manual configuration
189-
{expanded ? (
190-
<KeyboardArrowDownIcon fontSize="small" />
191-
) : (
192-
<KeyboardArrowRightIcon fontSize="small" />
193-
)}
194-
</Typography>
179+
mcpClientState.exists ? (
180+
<Typography
181+
variant="body2"
182+
sx={{
183+
color: 'text.secondary',
184+
alignItems: 'center',
185+
display: 'flex',
186+
cursor: 'pointer',
187+
}}
188+
onClick={() => setExpanded(!expanded)}
189+
>
190+
Manual configuration
191+
{expanded ? (
192+
<KeyboardArrowDownIcon fontSize="small" />
193+
) : (
194+
<KeyboardArrowRightIcon fontSize="small" />
195+
)}
196+
</Typography>
197+
) : (
198+
<Typography
199+
variant="body2"
200+
sx={{
201+
color: 'text.secondary',
202+
}}
203+
>
204+
Client not installed
205+
</Typography>
206+
)
195207
}
196208
action={
197209
<Stack direction="row" spacing={1}>
@@ -278,6 +290,7 @@ function ClientSetting({
278290
<Button
279291
sx={{ fontSize: 12 }}
280292
size="small"
293+
disabled
281294
onClick={async () => {
282295
setButtonsLoading({
283296
...buttonsLoading,

0 commit comments

Comments
 (0)