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;