feat: use comark for final output

This commit is contained in:
mitchell 2026-04-17 21:21:48 -04:00
parent c1e03f2464
commit 8a23cf4d42
4 changed files with 169 additions and 11 deletions

View file

@ -79,7 +79,7 @@ async function main() {
const prompt = positionals[2] ?? "Introduce yourself.";
convo.messages.push({ role: "user", content: prompt });
const { fullStream, textStream, text, totalUsage } = streamText({
const { fullStream, text, totalUsage } = streamText({
model: provider(convo.model),
messages: convo.messages,
});
@ -91,7 +91,7 @@ async function main() {
convo.messages.push({ role: "assistant", content: await text });
await convoFile.write(JSON.stringify(convo));
await renderer.renderFinal(textStream);
await renderer.renderFinal(text);
await renderer.renderStats(totalUsage, start, stop);
}