"use client"; import { Card } from "@/components/ui/Card"; import type { ChainPhase, ChainResultView } from "@/lib/chain/chain"; interface ChainProgressProps { phase: ChainPhase; progress: number; result: ChainResultView; } const PHASE_LABEL: Record = { running: "运行中", awaiting: "等待裁决", completed: "已完成", failed: "已失败", }; // 链进度视图:相位徽标 + 进度条 + 已写章号清单(token/正文绝不展示,result 只含元数据)。 export function ChainProgress({ phase, progress, result }: ChainProgressProps) { return (

链进度

{PHASE_LABEL[phase]}

已完成 {result.written.length} 章 {result.written.length > 0 ? ( ({result.written.join("、")}) ) : null}

{phase === "awaiting" && result.awaitingChapter !== null ? (

第 {result.awaitingChapter} 章存在未决冲突,请在下方逐条裁决后续跑。

) : null} ); }