|
| 1 | +import Link from "next/link"; |
| 2 | + |
| 3 | +import { getTechnicalReportCopy } from "../lib/technical-report"; |
| 4 | +import { Locale, localeHref } from "../lib/i18n"; |
| 5 | + |
| 6 | +export function TechnicalReportPage({ locale }: { locale: Locale }) { |
| 7 | + const copy = getTechnicalReportCopy(locale); |
| 8 | + |
| 9 | + return ( |
| 10 | + <div className="site-shell article"> |
| 11 | + <aside className="sidebar"> |
| 12 | + <div className="eyebrow">{copy.navLabel}</div> |
| 13 | + <nav> |
| 14 | + {copy.nav.map((item) => ( |
| 15 | + <a href={localeHref(locale, item.href)} key={item.href}> |
| 16 | + {item.label} |
| 17 | + </a> |
| 18 | + ))} |
| 19 | + </nav> |
| 20 | + </aside> |
| 21 | + |
| 22 | + <main className="prose report-paper"> |
| 23 | + <header className="report-header"> |
| 24 | + <h1>{copy.title}</h1> |
| 25 | + <div className="page-summary"> |
| 26 | + <p>{copy.subtitle}</p> |
| 27 | + </div> |
| 28 | + <section className="report-abstract" id="abstract"> |
| 29 | + <h2>{copy.abstractTitle}</h2> |
| 30 | + {copy.abstract.map((paragraph) => ( |
| 31 | + <p key={paragraph}>{paragraph}</p> |
| 32 | + ))} |
| 33 | + </section> |
| 34 | + <div className="report-metrics"> |
| 35 | + {copy.metrics.map((metric) => ( |
| 36 | + <div className="report-metric" key={metric.label}> |
| 37 | + <div className="report-metric-label">{metric.label}</div> |
| 38 | + <div className="report-metric-value">{metric.value}</div> |
| 39 | + <p>{metric.note}</p> |
| 40 | + </div> |
| 41 | + ))} |
| 42 | + </div> |
| 43 | + </header> |
| 44 | + |
| 45 | + <section className="simple-page-section" id="architecture-figure"> |
| 46 | + <h2>{copy.figureArchitectureTitle}</h2> |
| 47 | + <p>{copy.figureArchitectureCaption}</p> |
| 48 | + <ArchitectureFigure locale={locale} /> |
| 49 | + </section> |
| 50 | + |
| 51 | + {copy.sections.map((section) => ( |
| 52 | + <section className="simple-page-section" id={section.id} key={section.id}> |
| 53 | + <h2>{section.title}</h2> |
| 54 | + {section.paragraphs?.map((paragraph) => <p key={paragraph}>{paragraph}</p>)} |
| 55 | + {section.bullets ? ( |
| 56 | + <ul className="summary-list"> |
| 57 | + {section.bullets.map((bullet) => ( |
| 58 | + <li key={bullet}>{bullet}</li> |
| 59 | + ))} |
| 60 | + </ul> |
| 61 | + ) : null} |
| 62 | + </section> |
| 63 | + ))} |
| 64 | + |
| 65 | + <section className="simple-page-section" id="principle-table"> |
| 66 | + <h2>{locale === "zh" ? "表 1. 原理级对比" : "Table 1. Principle-Level Comparison"}</h2> |
| 67 | + <div className="table-wrap"> |
| 68 | + <table className="content-table"> |
| 69 | + <thead> |
| 70 | + <tr> |
| 71 | + {copy.principleHeaders.map((header) => ( |
| 72 | + <th key={header}>{header}</th> |
| 73 | + ))} |
| 74 | + </tr> |
| 75 | + </thead> |
| 76 | + <tbody> |
| 77 | + {copy.principleRows.map((row) => ( |
| 78 | + <tr key={row.join("|")}> |
| 79 | + {row.map((cell) => ( |
| 80 | + <td key={cell}>{cell}</td> |
| 81 | + ))} |
| 82 | + </tr> |
| 83 | + ))} |
| 84 | + </tbody> |
| 85 | + </table> |
| 86 | + </div> |
| 87 | + </section> |
| 88 | + |
| 89 | + <section className="simple-page-section" id="execution-figure"> |
| 90 | + <h2>{copy.figureExecutionTitle}</h2> |
| 91 | + <p>{copy.figureExecutionCaption}</p> |
| 92 | + <ExecutionFigure locale={locale} /> |
| 93 | + </section> |
| 94 | + |
| 95 | + <section className="simple-page-section" id="benchmarks-overall"> |
| 96 | + <h2>{locale === "zh" ? "表 2. Overall Benchmark" : "Table 2. Overall Benchmark"}</h2> |
| 97 | + <div className="table-wrap"> |
| 98 | + <table className="content-table"> |
| 99 | + <thead> |
| 100 | + <tr> |
| 101 | + {copy.overallHeaders.map((header) => ( |
| 102 | + <th key={header}>{header}</th> |
| 103 | + ))} |
| 104 | + </tr> |
| 105 | + </thead> |
| 106 | + <tbody> |
| 107 | + {copy.overallRows.map((row) => ( |
| 108 | + <tr key={row.join("|")}> |
| 109 | + {row.map((cell) => ( |
| 110 | + <td key={cell}>{cell}</td> |
| 111 | + ))} |
| 112 | + </tr> |
| 113 | + ))} |
| 114 | + </tbody> |
| 115 | + </table> |
| 116 | + </div> |
| 117 | + </section> |
| 118 | + |
| 119 | + <section className="simple-page-section" id="benchmarks-tier"> |
| 120 | + <h2>{locale === "zh" ? "表 3. Tier Breakdown" : "Table 3. Tier Breakdown"}</h2> |
| 121 | + <div className="table-wrap"> |
| 122 | + <table className="content-table"> |
| 123 | + <thead> |
| 124 | + <tr> |
| 125 | + {copy.tierHeaders.map((header) => ( |
| 126 | + <th key={header}>{header}</th> |
| 127 | + ))} |
| 128 | + </tr> |
| 129 | + </thead> |
| 130 | + <tbody> |
| 131 | + {copy.tierRows.map((row) => ( |
| 132 | + <tr key={row.join("|")}> |
| 133 | + {row.map((cell) => ( |
| 134 | + <td key={cell}>{cell}</td> |
| 135 | + ))} |
| 136 | + </tr> |
| 137 | + ))} |
| 138 | + </tbody> |
| 139 | + </table> |
| 140 | + </div> |
| 141 | + </section> |
| 142 | + |
| 143 | + <section className="simple-page-section" id="limits"> |
| 144 | + <h2>{copy.limitsTitle}</h2> |
| 145 | + <ul className="summary-list"> |
| 146 | + {copy.limits.map((item) => ( |
| 147 | + <li key={item}>{item}</li> |
| 148 | + ))} |
| 149 | + </ul> |
| 150 | + </section> |
| 151 | + |
| 152 | + <section className="simple-page-section" id="conclusion"> |
| 153 | + <h2>{copy.conclusionTitle}</h2> |
| 154 | + {copy.conclusion.map((paragraph) => ( |
| 155 | + <p key={paragraph}>{paragraph}</p> |
| 156 | + ))} |
| 157 | + </section> |
| 158 | + |
| 159 | + <h2 id="read-next">{locale === "zh" ? "继续阅读" : "Read next"}</h2> |
| 160 | + <p> |
| 161 | + {copy.readNext.map((item, index) => ( |
| 162 | + <span key={item.href}> |
| 163 | + {index > 0 ? ", " : ""} |
| 164 | + <Link href={localeHref(locale, item.href)}>{item.label}</Link> |
| 165 | + </span> |
| 166 | + ))} |
| 167 | + . |
| 168 | + </p> |
| 169 | + </main> |
| 170 | + </div> |
| 171 | + ); |
| 172 | +} |
| 173 | + |
| 174 | +function ArchitectureFigure({ locale }: { locale: Locale }) { |
| 175 | + const labels = getTechnicalReportCopy(locale).figureLabels; |
| 176 | + return ( |
| 177 | + <div className="report-figure"> |
| 178 | + <div className="report-figure-grid"> |
| 179 | + <div className="report-column"> |
| 180 | + <div className="report-column-label">{labels.clients}</div> |
| 181 | + <div className="report-node report-node-strong">{labels.clientMcp}</div> |
| 182 | + <div className="report-node report-node-strong">{labels.clientZcp}</div> |
| 183 | + </div> |
| 184 | + <div className="report-column"> |
| 185 | + <div className="report-column-label">{labels.surfaces}</div> |
| 186 | + <div className="report-node">{labels.mcpSurface}</div> |
| 187 | + <div className="report-node">{labels.nativeSurface}</div> |
| 188 | + </div> |
| 189 | + <div className="report-column"> |
| 190 | + <div className="report-column-label">{labels.runtime}</div> |
| 191 | + <div className="report-node report-node-runtime">{labels.host}</div> |
| 192 | + <div className="report-node report-node-muted">{labels.policy}</div> |
| 193 | + </div> |
| 194 | + </div> |
| 195 | + </div> |
| 196 | + ); |
| 197 | +} |
| 198 | + |
| 199 | +function ExecutionFigure({ locale }: { locale: Locale }) { |
| 200 | + const labels = getTechnicalReportCopy(locale).figureLabels; |
| 201 | + return ( |
| 202 | + <div className="report-comparison"> |
| 203 | + <div className="report-track"> |
| 204 | + <h3>{labels.mcpSurface}</h3> |
| 205 | + <div className="report-step">{labels.toolListAll}</div> |
| 206 | + <div className="report-arrow" /> |
| 207 | + <div className="report-step">{labels.genericPlanning}</div> |
| 208 | + <div className="report-arrow" /> |
| 209 | + <div className="report-step">{labels.verboseResults}</div> |
| 210 | + </div> |
| 211 | + <div className="report-track"> |
| 212 | + <h3>{labels.nativeSurface}</h3> |
| 213 | + <div className="report-step report-step-accent">{labels.semanticSubset}</div> |
| 214 | + <div className="report-arrow" /> |
| 215 | + <div className="report-step report-step-accent">{labels.stagedPlanning}</div> |
| 216 | + <div className="report-arrow" /> |
| 217 | + <div className="report-step report-step-accent">{labels.compactResults}</div> |
| 218 | + <div className="report-feedback">{labels.feedbackLoop}</div> |
| 219 | + </div> |
| 220 | + </div> |
| 221 | + ); |
| 222 | +} |
0 commit comments