(parsedResult, meta)
| 313 | } |
| 314 | |
| 315 | export function renderTaskResult(parsedResult, meta) { |
| 316 | const rawOutput = typeof parsedResult?.rawOutput === "string" ? parsedResult.rawOutput : ""; |
| 317 | if (rawOutput) { |
| 318 | return rawOutput.endsWith("\n") ? rawOutput : `${rawOutput}\n`; |
| 319 | } |
| 320 | |
| 321 | const message = String(parsedResult?.failureMessage ?? "").trim() || "Codex did not return a final message."; |
| 322 | return `${message}\n`; |
| 323 | } |
| 324 | |
| 325 | export function renderStatusReport(report) { |
| 326 | const lines = [ |