feat: render preview inline in fanout_status output
This commit is contained in:
parent
81e5cb83bc
commit
246af50c08
9
index.ts
9
index.ts
|
|
@ -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")
|
||||
|
|
|
|||
Reference in New Issue