import React from "react"; import { RefreshCw } from "lucide-react"; import { useI18n } from "../../../../application/i18n/I18nProvider"; import { Button } from "../../../ui/button"; import { cn } from "../../../../lib/utils"; import type { AgentPathInfo } from "./types"; export const CopilotCliCard: React.FC<{ pathInfo: AgentPathInfo | null; isResolvingPath: boolean; customPath: string; onCustomPathChange: (path: string) => void; onRecheckPath: () => void; i18nPrefix?: "ai.copilot" | "ai.cursor"; allowEmptyCheck?: boolean; showCustomPathInput?: boolean; }> = ({ pathInfo, isResolvingPath, customPath, onCustomPathChange, onRecheckPath, i18nPrefix = "ai.copilot", allowEmptyCheck = false, showCustomPathInput = true, }) => { const { t } = useI18n(); const found = pathInfo?.available; const statusText = isResolvingPath ? t(`${i18nPrefix}.detecting`) : found ? t(`${i18nPrefix}.detected`) : t(`${i18nPrefix}.notFound`); const statusClassName = isResolvingPath ? "text-muted-foreground" : found ? "text-emerald-500" : "text-amber-500"; return (
{t(`${i18nPrefix}.description`)}
{t(`${i18nPrefix}.notFoundHint`)}