/** * Terminal Connection Progress * Displays connection progress with logs and timeout */ import { AlertCircle, Clock, Play, ShieldCheck } from 'lucide-react'; import React from 'react'; import { Button } from '../ui/button'; import { ScrollArea } from '../ui/scroll-area'; export interface TerminalConnectionProgressProps { status: 'connecting' | 'connected' | 'disconnected'; error: string | null; timeLeft: number; isCancelling: boolean; showLogs: boolean; _setShowLogs: (show: boolean) => void; // Reserved for future log toggle UI within this component progressLogs: string[]; onCancel: () => void; onRetry: () => void; } export const TerminalConnectionProgress: React.FC = ({ status, error, timeLeft, isCancelling, showLogs, _setShowLogs, // Reserved for future log toggle UI within this component progressLogs, onCancel, onRetry, }) => { return ( <>
{status === 'connecting' ? `Timeout in ${timeLeft}s` : error || 'Disconnected'}
{status === 'connecting' ? ( ) : (
)}
{showLogs && (
{progressLogs.map((line, idx) => (
{line}
))} {error && (
{error}
)}
)} ); }; export default TerminalConnectionProgress;