WI: Fix adding empty text to recursion buffer

This commit is contained in:
Cohee
2025-03-03 00:05:35 +02:00
parent c9ebea1d0a
commit 0088333ebf

View File

@ -4264,8 +4264,10 @@ export async function checkWorldInfo(chat, maxContext, isDryRun) {
if (scanState) {
const text = successfulNewEntriesForRecursion
.map(x => x.content).join('\n');
buffer.addRecurse(text);
allActivatedText = (text + '\n' + allActivatedText);
if (text) {
buffer.addRecurse(text);
allActivatedText = (text + '\n' + allActivatedText);
}
} else {
logNextState('[WI] Scan done. No new entries to prompt. Stopping.');
}