From ce12c51435b6e39e402c9f90cffbff687c8249fb Mon Sep 17 00:00:00 2001 From: mitchell Date: Thu, 16 Apr 2026 17:13:12 -0400 Subject: [PATCH] fix: render clearing bug and expand containment field --- index.ts | 2 +- src/render/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.ts b/index.ts index 8f2d945..45566b5 100644 --- a/index.ts +++ b/index.ts @@ -43,7 +43,7 @@ async function main() { messages.push({ role: "user", content: prompt }); const { fullStream, textStream, text, totalUsage } = streamText({ - model: provider(args.model ?? "gemma4-26b-a4b"), + model: provider(args.model ?? "qwen3.5-35b-a3b"), messages, }); diff --git a/src/render/index.ts b/src/render/index.ts index 5a6e854..3b0e33b 100644 --- a/src/render/index.ts +++ b/src/render/index.ts @@ -38,12 +38,12 @@ export default class StreamRenderer { if (text.includes("\n")) { this.lineCount += text.match(/\n/g)?.length ?? 1; this.charsSinceNL = text.length - text.lastIndexOf("\n") - 1; - } else if (this.charsSinceNL >= columns) { + } else if (this.charsSinceNL > columns) { this.lineCount++; this.charsSinceNL = this.charsSinceNL - columns; } - if (this.lineCount >= rows / 2) { + if (this.lineCount >= Math.floor(rows * 0.75)) { this.moveCursor(0, -this.lineCount); this.clearScreenDown(); this.lineCount = 0;