refactor: 大规模迁移原有组件到 ink 包内

This commit is contained in:
claude-code-best
2026-04-07 22:26:45 +08:00
parent 52a9cc0414
commit 91b9366f64
44 changed files with 563 additions and 2480 deletions

View File

@@ -267,19 +267,9 @@ function SpinnerWithVerbInner({
const messageColor = overrideColor ?? defaultColor
const shimmerColor = overrideShimmerColor ?? defaultShimmerColor
// Compute TTFT string here (off the 50ms animation clock) and pass to
// SpinnerAnimationRow so it folds into the `(thought for Ns · ...)` status
// line instead of taking a separate row. apiMetricsRef is a ref so this
// doesn't trigger re-renders; we pick up updates on the parent's ~25x/turn
// re-render cadence, same as the old ApiMetricsLine did.
// TTFT display is gated to internal builds — apiMetricsRef was removed from
// props during a refactor, so skip this until it's re-threaded.
let ttftText: string | null = null
if (
process.env.USER_TYPE === 'ant' &&
apiMetricsRef?.current &&
apiMetricsRef.current.length > 0
) {
ttftText = computeTtftText(apiMetricsRef.current)
}
// When leader is idle but teammates are running (and we're viewing the leader),
// show a static dim idle display instead of the animated spinner — otherwise