diff --git a/index.ts b/index.ts index 46fc44f..1fb3a7c 100644 --- a/index.ts +++ b/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")