链页 app/projects/[id]/chains(RSC fetchProject)+ ChainPage/ChainStarter/
ChainProgress/ChainAdjudication;lib/chain 纯函数(result 收窄/相位映射/resume 组装)。
复用 useJobPoll 轮询、ConflictCard + decisions.ts 裁决、normalizeConflicts/latestReview、
friendlyError;nav 加 chains 入口。awaiting(interrupt)→ 读该章冲突渲 ConflictCard →
POST .../chains/runs/{job_id}/resume 续跑。gen:api 纳入 chains run/resume。
守 #5(链暂停=等裁决,token/正文不入 job result)。
21 lines
624 B
TypeScript
21 lines
624 B
TypeScript
import { notFound } from "next/navigation";
|
||
|
||
import { ChainPage } from "@/components/chain/ChainPage";
|
||
import { fetchProject } from "@/lib/api/server";
|
||
|
||
interface PageProps {
|
||
params: Promise<{ id: string }>;
|
||
}
|
||
|
||
// 多章工作流链页(Scope B B1)。Server Component 取项目;ChainPage(Client)承载
|
||
// 发起 → job 轮询进度 → interrupt 裁决 → resume 续跑交互。
|
||
export default async function ChainsRoutePage({ params }: PageProps) {
|
||
const { id } = await params;
|
||
try {
|
||
const project = await fetchProject(id);
|
||
return <ChainPage project={project} />;
|
||
} catch {
|
||
notFound();
|
||
}
|
||
}
|