type Props = { workDir?: string | null repoName?: string | null branch?: string | null compact?: boolean } export function ProjectContextChip({ workDir, repoName, branch, compact = false }: Props) { const label = branch ? (repoName || workDir?.split('/').pop() || '') : (workDir?.split('/').pop() || repoName || '') if (!label) return null return (
{branch ? ( ) : ( folder )} {label} {branch ? ( <> | {branch} ) : null}
) }