()
| 449 | return sample(getSpinnerVerbs()) ?? "Working"; |
| 450 | } |
| 451 | export function BriefIdleStatus() { |
| 452 | const $ = _c(9); |
| 453 | const connStatus = useAppState(_temp7); |
| 454 | const runningCount = useAppState(_temp8); |
| 455 | const { |
| 456 | columns |
| 457 | } = useTerminalSize(); |
| 458 | const showConnWarning = connStatus === "reconnecting" || connStatus === "disconnected"; |
| 459 | const connText = connStatus === "reconnecting" ? "Reconnecting\u2026" : "Disconnected"; |
| 460 | const leftText = showConnWarning ? connText : ""; |
| 461 | const rightText = runningCount > 0 ? `${runningCount} in background` : ""; |
| 462 | if (!leftText && !rightText) { |
| 463 | let t0; |
| 464 | if ($[0] === Symbol.for("react.memo_cache_sentinel")) { |
| 465 | t0 = <Box height={2} />; |
| 466 | $[0] = t0; |
| 467 | } else { |
| 468 | t0 = $[0]; |
| 469 | } |
| 470 | return t0; |
| 471 | } |
| 472 | const pad = Math.max(1, columns - 2 - stringWidth(leftText) - stringWidth(rightText)); |
| 473 | let t0; |
| 474 | if ($[1] !== leftText) { |
| 475 | t0 = leftText ? <Text color="error">{leftText}</Text> : null; |
| 476 | $[1] = leftText; |
| 477 | $[2] = t0; |
| 478 | } else { |
| 479 | t0 = $[2]; |
| 480 | } |
| 481 | let t1; |
| 482 | if ($[3] !== pad || $[4] !== rightText) { |
| 483 | t1 = rightText ? <><Text>{" ".repeat(pad)}</Text><Text color="subtle">{rightText}</Text></> : null; |
| 484 | $[3] = pad; |
| 485 | $[4] = rightText; |
| 486 | $[5] = t1; |
| 487 | } else { |
| 488 | t1 = $[5]; |
| 489 | } |
| 490 | let t2; |
| 491 | if ($[6] !== t0 || $[7] !== t1) { |
| 492 | t2 = <Box marginTop={1} paddingLeft={2}><Text>{t0}{t1}</Text></Box>; |
| 493 | $[6] = t0; |
| 494 | $[7] = t1; |
| 495 | $[8] = t2; |
| 496 | } else { |
| 497 | t2 = $[8]; |
| 498 | } |
| 499 | return t2; |
| 500 | } |
| 501 | function _temp8(s_0) { |
| 502 | return count(Object.values(s_0.tasks), isBackgroundTask) + s_0.remoteBackgroundTaskCount; |
| 503 | } |
nothing calls this directly
no test coverage detected