(result)
| 148 | } |
| 149 | |
| 150 | export function renderHtml(result) { |
| 151 | if (result.kind === "workflow-guide") { |
| 152 | return `<!doctype html> |
| 153 | <html lang="en"> |
| 154 | <head> |
| 155 | <meta charset="utf-8" /> |
| 156 | <title>Plugin Eval Start Here</title> |
| 157 | </head> |
| 158 | <body> |
| 159 | <main> |
| 160 | <h1>Plugin Eval Start Here: ${escapeHtml(result.target.name)}</h1> |
| 161 | ${renderWorkflowGuide(result)} |
| 162 | <h2>Recommended Next Step</h2> |
| 163 | ${renderNextAction(result.nextAction)} |
| 164 | <h2>Current Local State</h2> |
| 165 | ${renderList([ |
| 166 | `Benchmark config present: ${result.workflowStatus.hasBenchmarkConfig ? "yes" : "no"}`, |
| 167 | `Usage log present: ${result.workflowStatus.hasUsageLog ? "yes" : "no"}`, |
| 168 | ])} |
| 169 | <h2>Full Local Sequence</h2> |
| 170 | ${renderList(result.startHere?.commands || [])} |
| 171 | </main> |
| 172 | </body> |
| 173 | </html>`; |
| 174 | } |
| 175 | |
| 176 | if (result.kind === "measurement-plan") { |
| 177 | return `<!doctype html> |
| 178 | <html lang="en"> |
| 179 | <head> |
| 180 | <meta charset="utf-8" /> |
| 181 | <title>Measurement Plan</title> |
| 182 | </head> |
| 183 | <body> |
| 184 | <main> |
| 185 | <h1>Measurement Plan: ${escapeHtml(result.target.name)}</h1> |
| 186 | ${renderMeasurementPlan(result)} |
| 187 | <h2>Recommended Next Step</h2> |
| 188 | ${renderNextAction(result.nextAction)} |
| 189 | <h2>Use From Codex Chat</h2> |
| 190 | ${renderWorkflowGuide(result.workflowGuide)} |
| 191 | </main> |
| 192 | </body> |
| 193 | </html>`; |
| 194 | } |
| 195 | |
| 196 | if (result.kind === "benchmark-template-init") { |
| 197 | return `<!doctype html> |
| 198 | <html lang="en"> |
| 199 | <head> |
| 200 | <meta charset="utf-8" /> |
| 201 | <title>Benchmark Template Ready</title> |
| 202 | </head> |
| 203 | <body> |
| 204 | <main> |
| 205 | <h1>Benchmark Template Ready: ${escapeHtml(result.target.name)}</h1> |
| 206 | <p>Config: ${escapeHtml(result.configPath)}</p> |
| 207 | <h2>Recommended Next Step</h2> |
no test coverage detected