feat: render preview inline in fanout_status output

This commit is contained in:
jay 2026-05-15 05:12:41 +02:00
parent 81e5cb83bc
commit 246af50c08
1 changed files with 2 additions and 7 deletions

View File

@ -130,13 +130,8 @@ export default function (pi: ExtensionAPI) {
let jobLine =
`- ${j.id} | ${j.agent} | ${j.status}` +
(j.exitCode !== undefined ? ` (exit ${j.exitCode})` : "") +
(j.turns ? ` | ${j.turns} turns` : "");
if (j.preview) {
jobLine += `\n \`\`\`\n${j.preview
.split("\n")
.map((line) => ` ${line}`)
.join("\n")}\n \`\`\``;
}
(j.turns ? ` | ${j.turns} turns` : "") +
(j.preview ? `\n Preview: ${j.preview.slice(0, 120).replace(/\n/g, " ")}${j.preview.length > 120 ? "…" : ""}` : "");
return jobLine;
})
.join("\n")