import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { BranchSwitcher } from "@/components/repo/BranchSwitcher"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; import { BackButton } from "@/components/ui/back-button"; import { Plus, FolderOpen, GitBranch, Plug, MoreVertical } from "lucide-react"; interface RepoDetailHeaderProps { repoName: string; repoId: number; currentBranch: string | null; isWorktree: boolean; repoUrl: string | null; onMcpClick: () => void; onFilesClick: () => void; onNewSession: () => void; disabledNewSession?: boolean; } export function RepoDetailHeader({ repoName, repoId, currentBranch, isWorktree, repoUrl, onMcpClick, onFilesClick, onNewSession, disabledNewSession, }: RepoDetailHeaderProps) { const branchToDisplay = isWorktree ? (currentBranch ? `WT: ${currentBranch}` : "Worktree") : currentBranch const isNotMainBranch = currentBranch && currentBranch !== "main" && currentBranch !== "master" return (

{repoName}

{!isWorktree && currentBranch && branchToDisplay ? ( ) : branchToDisplay ? ( {isWorktree && } {branchToDisplay} ) : null}
{!isWorktree && currentBranch && ( <> e.stopPropagation()}>
)} MCP Files
) }