(t0)
| 28 | label: 'Checking out branch' |
| 29 | }]; |
| 30 | export function TeleportProgress(t0) { |
| 31 | const $ = _c(16); |
| 32 | const { |
| 33 | currentStep, |
| 34 | sessionId |
| 35 | } = t0; |
| 36 | const [ref, time] = useAnimationFrame(100); |
| 37 | const frame = Math.floor(time / 100) % SPINNER_FRAMES.length; |
| 38 | let t1; |
| 39 | if ($[0] !== currentStep) { |
| 40 | t1 = s => s.key === currentStep; |
| 41 | $[0] = currentStep; |
| 42 | $[1] = t1; |
| 43 | } else { |
| 44 | t1 = $[1]; |
| 45 | } |
| 46 | const currentStepIndex = STEPS.findIndex(t1); |
| 47 | const t2 = SPINNER_FRAMES[frame]; |
| 48 | let t3; |
| 49 | if ($[2] !== t2) { |
| 50 | t3 = <Box marginBottom={1}><Text bold={true} color="claude">{t2} Teleporting session…</Text></Box>; |
| 51 | $[2] = t2; |
| 52 | $[3] = t3; |
| 53 | } else { |
| 54 | t3 = $[3]; |
| 55 | } |
| 56 | let t4; |
| 57 | if ($[4] !== sessionId) { |
| 58 | t4 = sessionId && <Box marginBottom={1}><Text dimColor={true}>{sessionId}</Text></Box>; |
| 59 | $[4] = sessionId; |
| 60 | $[5] = t4; |
| 61 | } else { |
| 62 | t4 = $[5]; |
| 63 | } |
| 64 | let t5; |
| 65 | if ($[6] !== currentStepIndex || $[7] !== frame) { |
| 66 | t5 = STEPS.map((step, index) => { |
| 67 | const isComplete = index < currentStepIndex; |
| 68 | const isCurrent = index === currentStepIndex; |
| 69 | const isPending = index > currentStepIndex; |
| 70 | let icon; |
| 71 | let color; |
| 72 | if (isComplete) { |
| 73 | icon = figures.tick; |
| 74 | color = "green"; |
| 75 | } else { |
| 76 | if (isCurrent) { |
| 77 | icon = SPINNER_FRAMES[frame]; |
| 78 | color = "claude"; |
| 79 | } else { |
| 80 | icon = figures.circle; |
| 81 | color = undefined; |
| 82 | } |
| 83 | } |
| 84 | return <Box key={step.key} flexDirection="row"><Box width={2}><Text color={color as never} dimColor={isPending}>{icon}</Text></Box><Text dimColor={isPending} bold={isCurrent}>{step.label}</Text></Box>; |
| 85 | }); |
| 86 | $[6] = currentStepIndex; |
| 87 | $[7] = frame; |
nothing calls this directly
no test coverage detected