fix(auto-reply): tighten block streaming defaults

This commit is contained in:
Peter Steinberger committed 2026-01-09 22:41:10 +01:00
1 parent f8bf041396
commit 79af03ba5e
13 files changed
+71 -25

No files matched your search

+8
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)