(result, meta)
| 286 | } |
| 287 | |
| 288 | export function renderNativeReviewResult(result, meta) { |
| 289 | const stdout = result.stdout.trim(); |
| 290 | const stderr = result.stderr.trim(); |
| 291 | const lines = [ |
| 292 | `# Codex ${meta.reviewLabel}`, |
| 293 | "", |
| 294 | `Target: ${meta.targetLabel}`, |
| 295 | "" |
| 296 | ]; |
| 297 | |
| 298 | if (stdout) { |
| 299 | lines.push(stdout); |
| 300 | } else if (result.status === 0) { |
| 301 | lines.push("Codex review completed without any stdout output."); |
| 302 | } else { |
| 303 | lines.push("Codex review failed."); |
| 304 | } |
| 305 | |
| 306 | if (stderr) { |
| 307 | lines.push("", "stderr:", "", "```text", stderr, "```"); |
| 308 | } |
| 309 | |
| 310 | appendReasoningSection(lines, meta.reasoningSummary); |
| 311 | |
| 312 | return `${lines.join("\n").trimEnd()}\n`; |
| 313 | } |
| 314 | |
| 315 | export function renderTaskResult(parsedResult, meta) { |
| 316 | const rawOutput = typeof parsedResult?.rawOutput === "string" ? parsedResult.rawOutput : ""; |
no test coverage detected