Skip to content

Commit eccce6b

Browse files
committed
Show the number of tools
Signed-off-by: David Gageot <[email protected]>
1 parent e0fe939 commit eccce6b

File tree

1 file changed

+6
-9
lines changed
  • src/extension/ui/src/components/tile

1 file changed

+6
-9
lines changed

src/extension/ui/src/components/tile/Modal.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
Avatar,
1010
Badge,
1111
Box,
12-
ButtonGroup,
1312
Chip,
1413
CircularProgress,
1514
Dialog,
@@ -31,10 +30,9 @@ import {
3130
TextField,
3231
Tooltip,
3332
Typography,
34-
useTheme,
33+
useTheme
3534
} from '@mui/material';
3635
import { useEffect, useRef, useState } from 'react';
37-
3836
import {
3937
ASSIGNED_SECRET_PLACEHOLDER,
4038
getUnsupportedSecretMessage,
@@ -250,7 +248,7 @@ const ConfigurationModal = ({
250248
<>
251249
<Box sx={{ borderBottom: 1, borderColor: 'divider', mt: 2 }}>
252250
<Tabs value={tabValue} onChange={handleTabChange}>
253-
<Tab label="Tools" />
251+
<Tab label={`Tools (${catalogItem?.tools?.length})`} />
254252
{!contributesNoConfigOrSecrets && (
255253
<Tab
256254
disabled={contributesNoConfigOrSecrets}
@@ -301,8 +299,7 @@ const ConfigurationModal = ({
301299
<Link
302300
onClick={() =>
303301
client.host.openExternal(
304-
`${
305-
catalogItem.readme
302+
`${catalogItem.readme
306303
}#tool-${tool.name.replaceAll(' ', '-')}` || ''
307304
)
308305
}
@@ -344,13 +341,13 @@ const ConfigurationModal = ({
344341
</Alert>
345342
)}
346343
{ddInfo?.hasSecretSupport &&
347-
catalogItem.secrets &&
348-
catalogItem.secrets?.length > 0 ? (
344+
catalogItem.secrets &&
345+
catalogItem.secrets?.length > 0 ? (
349346
catalogItem.secrets.map((secret, index) => {
350347
const secretEdited =
351348
(secret.assigned &&
352349
localSecrets[secret.name] !==
353-
ASSIGNED_SECRET_PLACEHOLDER) ||
350+
ASSIGNED_SECRET_PLACEHOLDER) ||
354351
(!secret.assigned &&
355352
localSecrets[secret.name] !== '');
356353
return (

0 commit comments

Comments
 (0)