/** * Profile Info Section * Displays profile information and usage commands */ import { useTranslation } from 'react-i18next'; import { ScrollArea } from '@/components/ui/scroll-area'; import { Label } from '@/components/ui/label'; import { CopyButton } from '@/components/ui/copy-button'; import { Badge } from '@/components/ui/badge'; import { CheckCircle2, Info, Link2, TriangleAlert } from 'lucide-react'; import type { SettingsResponse } from './types'; import type { CliTarget } from '@/lib/api-client'; interface InfoSectionProps { profileName: string; target: CliTarget; data: SettingsResponse | undefined; } export function InfoSection({ profileName, target, data }: InfoSectionProps) { const { t } = useTranslation(); const isDroidTarget = target === 'droid'; return (
{/* Profile Information */}

{t('profileEditor.profileInfo')}

{data && ( <>
{t('profileEditor.profileName')} {data.profile}
{t('profileEditor.filePath')}
{data.path}
{t('profileEditor.lastModified')} {new Date(data.mtime).toLocaleString()}
{t('profileEditor.defaultTarget')} {target}
{data.cliproxyBridge && ( <>
Source
CLIProxy {data.cliproxyBridge.providerDisplayName} {data.cliproxyBridge.source}

This profile is routed through{' '} {data.cliproxyBridge.routePath} . Keys and account state stay managed in CLIProxy.

Bridge Status
{data.cliproxyBridge.usesCurrentTarget ? ( ) : ( )} {data.cliproxyBridge.usesCurrentTarget ? 'Proxy target is current' : 'Proxy target changed'} {data.cliproxyBridge.usesCurrentAuthToken ? ( ) : ( )} {data.cliproxyBridge.usesCurrentAuthToken ? 'Auth token matches current proxy' : 'Auth token may need refresh'}

Expected proxy URL:{' '} {data.cliproxyBridge.currentBaseUrl}

)} )}
{/* Usage */}

{t('profileEditor.quickUsage')}

ccs {profileName} "prompt"
{isDroidTarget ? `ccsd ${profileName} "prompt"` : `ccs ${profileName} --target droid "prompt"`}
ccs {profileName} --target claude "prompt"
ccs default {profileName}
); }