import type { ReactNode } from 'react'
import { IconAlertCircleFilled } from '@tabler/icons-react'
import { Skeleton } from '@/client/components/ui/skeleton'
import { IconMcp } from '@/client/features/connectors/IconMcp'
import { formatMcpServerName, getMcpIcon } from '@/client/features/connectors/mcp-icons'
import type { McpServer } from '@/lib/types'
function statusLabel(status: McpServer['status']): string {
if (status === 'needs-auth') return 'Needs auth'
return status[0].toUpperCase() + status.slice(1)
}
type McpServerIconProps = {
name: string
status: McpServer['status']
}
function McpServerIcon({ name, status }: McpServerIconProps) {
const icon = getMcpIcon(name)
const className = 'size-full rounded-lg ring-2 ring-background'
return (
{icon ? (
) : (