From 8ff27c5de806be2143cfcbe4345eff781e06f511 Mon Sep 17 00:00:00 2001 From: mitchell Date: Sun, 3 May 2026 21:21:56 -0400 Subject: [PATCH] fix: only clear spinner when it was actually spinning --- src/render/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/render/index.ts b/src/render/index.ts index 012458c..b3b5f69 100644 --- a/src/render/index.ts +++ b/src/render/index.ts @@ -89,14 +89,16 @@ export default class Renderer { this.resetCounts(); const spin = spinner({ withGuide: false, indicator: "timer" }); + let spinning = false; if (!this.isPlain) { + spinning = true; spin.start("Waiting for response"); } for await (const part of stream) { switch (part.type) { case "reasoning-start": { - if (!this.isPlain) { + if (spinning) { spin.clear(); } if (supportsColorStderr) @@ -130,7 +132,7 @@ export default class Renderer { break; } case "text-start": { - if (!this.isPlain) { + if (spinning) { spin.clear(); } this.write("\n");