fix(auto-reply): tighten block streaming defaults

This commit is contained in:
Peter Steinberger
2026-01-09 22:40:58 +01:00
parent f8bf041396
commit 79af03ba5e
13 changed files with 71 additions and 25 deletions

View File

@@ -53,6 +53,14 @@ export class EmbeddedBlockChunker {
const maxChars = Math.max(minChars, Math.floor(this.#chunking.maxChars));
if (this.#buffer.length < minChars && !force) return;
if (force && this.#buffer.length <= maxChars) {
if (this.#buffer.trim().length > 0) {
emit(this.#buffer);
}
this.#buffer = "";
return;
}
while (
this.#buffer.length >= minChars ||
(force && this.#buffer.length > 0)