import { readFileSync } from "node:fs"; /** * The rectification chat surface as source text: the container component and * the hooks, parameter functions and blocks it was split into * (TASK-rectification-code-split-20260926). Same idea as `home-surface.ts`: * a whole-source contract that held on `rectification-agentic-chat.tsx` * before the split holds on this concatenation after it, because the code is * the same code in more files. Slices between two anchors do not survive the * split; those tests call the extracted functions instead. */ export const rectificationChatSurfaceFiles = [ "../src/components/rectification-agentic-chat.tsx", "../src/components/rectification-question-gap-notices.tsx", "../src/hooks/use-rectification-case-snapshot.ts", "../src/hooks/use-rectification-board-layout.ts", "../src/hooks/use-rectification-live-activity.ts", "../src/lib/rectification-chat-messages.ts", "../src/lib/rectification-chat-snapshot.ts", "../src/lib/rectification-chat-turn-run.ts", "../src/lib/rectification-chat-choice-run.ts", "../src/lib/rectification-chat-accept-run.ts", "../src/lib/rectification-chat-message-actions.ts", "../src/lib/rectification-chat-question-repair.ts", "../src/lib/rectification-chat-view.ts", ] as const; export function readRectificationChatFile(relativePath: (typeof rectificationChatSurfaceFiles)[number]): string { return readFileSync(new URL(relativePath, import.meta.url), "utf8"); } export const rectificationChatSurface = rectificationChatSurfaceFiles .map((relativePath) => readRectificationChatFile(relativePath)) .join("\n");