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 =
|
let jobLine =
|
||||||
`- ${j.id} | ${j.agent} | ${j.status}` +
|
`- ${j.id} | ${j.agent} | ${j.status}` +
|
||||||
(j.exitCode !== undefined ? ` (exit ${j.exitCode})` : "") +
|
(j.exitCode !== undefined ? ` (exit ${j.exitCode})` : "") +
|
||||||
(j.turns ? ` | ${j.turns} turns` : "");
|
(j.turns ? ` | ${j.turns} turns` : "") +
|
||||||
if (j.preview) {
|
(j.preview ? `\n Preview: ${j.preview.slice(0, 120).replace(/\n/g, " ")}${j.preview.length > 120 ? "…" : ""}` : "");
|
||||||
jobLine += `\n \`\`\`\n${j.preview
|
|
||||||
.split("\n")
|
|
||||||
.map((line) => ` ${line}`)
|
|
||||||
.join("\n")}\n \`\`\``;
|
|
||||||
}
|
|
||||||
return jobLine;
|
return jobLine;
|
||||||
})
|
})
|
||||||
.join("\n")
|
.join("\n")
|
||||||
|
|
|
||||||
Reference in New Issue