Unified · Split
| @@ -39,6 +39,14 @@ export function McpRemoteSourceFields(props: { · 38 unmodified lines | ||
| 39 | 39 | readonly namespaceReadOnly?: boolean; |
| 40 | 40 | readonly urlDisabled?: boolean; |
| 41 | 41 | }) { |
| 42 | + const previewDescription = props.preview | |
| 43 | + ? props.preview.connected | |
| 44 | + ? props.preview.toolCount === null | |
| 45 | + ? null | |
| 46 | + : `${props.preview.toolCount} tool${props.preview.toolCount !== 1 ? "s" : ""} available` | |
| 47 | + : "OAuth required to discover tools" | |
| 48 | + : null; | |
| 49 | + | |
| 42 | 50 | if (props.preview) { |
| 43 | 51 | return ( |
| 44 | 52 | <CardStack> |
| @@ -51,11 +59,9 @@ export function McpRemoteSourceFields(props: { · 6 unmodified lines | ||
| 51 | 59 | <CardStackEntryTitle> |
| 52 | 60 | {props.preview.serverName ?? props.preview.name} |
| 53 | 61 | </CardStackEntryTitle> |
| 54 | − <CardStackEntryDescription> | |
| 55 | − {props.preview.connected | |
| 56 | − ? `${props.preview.toolCount} tool${props.preview.toolCount !== 1 ? "s" : ""} available` | |
| 57 | − : "OAuth required to discover tools"} | |
| 58 | − </CardStackEntryDescription> | |
| 62 | + {previewDescription ? ( | |
| 63 | + <CardStackEntryDescription>{previewDescription}</CardStackEntryDescription> | |
| 64 | + ) : null} | |
| 59 | 65 | </CardStackEntryContent> |
| 60 | 66 | <CardStackEntryActions> |
| 61 | 67 | {props.preview.connected ? ( |