refactor: move final rendering into Renderer class

This commit is contained in:
mitchell 2026-04-17 22:52:09 -04:00
parent cdfafc9d5f
commit c1e03f2464
2 changed files with 19 additions and 11 deletions

View file

@ -91,16 +91,9 @@ async function main() {
convo.messages.push({ role: "assistant", content: await text });
await convoFile.write(JSON.stringify(convo));
if (!plainOut) {
const [width] = process.stdout.getWindowSize();
await Bun.spawn({
cmd: ["glow", "-w", `${width}`, "-"],
stdin: textStream,
stdout: "inherit",
}).exited;
}
await renderer.renderFinal(textStream);
renderer.renderStats(await totalUsage, start, stop);
await renderer.renderStats(totalUsage, start, stop);
}
await main();