返回 CodeWhale
thinking-trace.tsx
根目录 / web / components / thinking-trace.tsx
1 import { getConstitution, pickText } from "@/lib/i18n/dictionaries";
2 import { CONSTITUTION_SCENES } from "@/lib/content/constitution";
3 import { Icon } from "./icon";
4 /**
5 * "See how it decides" — explanatory prose that illustrates how the
6 * constitution's rank shows up in a model's reasoning, paired with the
7 * decision each line of reasoning led to.
8 *
9 * These are ILLUSTRATIONS, labelled as such on the page: short paraphrases
10 * of the kind of reasoning the rank produces, not a transcript of one cited
11 * session. If a real, linkable session transcript is ever published, cite it
12 * here and change the label; until then, never present these as captured
13 * output (see AGENTS.md Article II).
14 */
15
16 export function ThinkingTrace({ locale = "en" }: { locale?: string }) {
17 const t = getConstitution(locale);
18 return (
19 <div className="grid-3">
20 {CONSTITUTION_SCENES.map((s, i) => (
21 <figure key={i} className="trace">
22 <figcaption className="trace-head">
23 <span className="status status-accent">
24 <span className="status-dot" aria-hidden="true" />
25 {t.illustration}
26 </span>
27 <span className="trace-context">{pickText(s.context, locale)}</span>
28 </figcaption>
29 <p className="trace-body">{s.trace}</p>
30 <p className="trace-cites">
31 {s.cites.map((c) => (
32 <span key={c} className="pill">{c}</span>
33 ))}
34 </p>
35 <p className="trace-decision">
36 <Icon name="arrow-right" className="icon icon-flip" />
37 <span>{pickText(s.decision, locale)}</span>
38 </p>
39 </figure>
40 ))}
41 </div>
42 );
43 }
44
44 lines Plain Text