"use client"; import Link from "next/link"; import { kindLabel, reasonLabel, type InjectionEntity, } from "@/lib/workbench/injection"; import { useInjection } from "@/lib/workbench/useInjection"; interface ChapterAssistantProps { projectId: string; chapterNo: number; } // 右栏「本章助手」(UX §6.3)。 // 「本章注入(透明)」读 B0 端点,列出确定性选中的设定/角色 + 入选理由徽标—— // 这是「看到的=写章用的」的信任牌(不变量 #6)。「四审」指向审稿页入口。 // 桌面 aside 包裹;移动端经 Workbench 抽屉复用 AssistantContent。 export function ChapterAssistant({ projectId, chapterNo, }: ChapterAssistantProps) { return ( ); } export function AssistantContent({ projectId, chapterNo, }: ChapterAssistantProps) { const injection = useInjection(projectId, chapterNo); const selected = injection.data?.selected ?? []; return (

本章助手

本章注入(透明)

{injection.loading ? (

加载注入信息…

) : injection.error ? (

{injection.error}

) : selected.length === 0 ? (

本章暂无注入实体(先在大纲点名设定/角色)。

) : ( )}

四审

一致性 / 伏笔 / 文风 / 节奏,在审稿页逐条裁决。

去审稿 →
); } function EntityRow({ entity }: { entity: InjectionEntity }) { return (
  • {kindLabel(entity.kind)} {entity.name}
    {(entity.reasons ?? []).map((reason) => ( {reasonLabel(reason)} ))}
  • ); }