fix: removed recurseReset()

This commit is contained in:
Aisu Wata 2024-04-04 15:19:39 -03:00
parent 95c910a521
commit 0d57f7ea4f

View File

@ -204,13 +204,6 @@ class WorldInfoBuffer {
this.#recurseBuffer.push(message);
}
/**
* Empties recursion buffer.
*/
recurseReset() {
this.#recurseBuffer = [];
}
/**
* Increments skew and sets startDepth to previous depth.
*/
@ -2236,9 +2229,6 @@ async function checkWorldInfo(chat, maxContext) {
}
if (needsToScan) {
// If you're here from a previous loop, clear recurse buffer
buffer.recurseReset();
const text = newEntries
.filter(x => !failedProbabilityChecks.has(x))
.filter(x => !x.preventRecursion)
@ -2258,8 +2248,6 @@ async function checkWorldInfo(chat, maxContext) {
if (!over_max) {
needsToScan = true; // loop
buffer.advanceScanPosition();
// No recurse was added, since `!needsToScan`, but clear previous one since it was checked already
buffer.recurseReset();
}
}
}