diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 7b9c3736c..5c7a952f4 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -3704,7 +3704,7 @@ function parseDecorators(content) { * @param {string[]} chat The chat messages to scan, in reverse order. * @param {number} maxContext The maximum context size of the generation. * @param {boolean} isDryRun Whether to perform a dry run. - * @typedef {{ worldInfoBefore: string, worldInfoAfter: string, EMEntries: any[], WIDepthEntries: any[], allActivatedEntries: Map }} WIActivated + * @typedef {{ worldInfoBefore: string, worldInfoAfter: string, EMEntries: any[], WIDepthEntries: any[], allActivatedEntries: Set }} WIActivated * @returns {Promise} The world info activated. */ export async function checkWorldInfo(chat, maxContext, isDryRun) { @@ -3748,7 +3748,7 @@ export async function checkWorldInfo(chat, maxContext, isDryRun) { !isDryRun && timedEffects.checkTimedEffects(); if (sortedEntries.length === 0) { - return { worldInfoBefore: '', worldInfoAfter: '', WIDepthEntries: [], EMEntries: [], allActivatedEntries: new Map() }; + return { worldInfoBefore: '', worldInfoAfter: '', WIDepthEntries: [], EMEntries: [], allActivatedEntries: new Set() }; } /** @type {number[]} Represents the delay levels for entries that are delayed until recursion */ @@ -4195,7 +4195,7 @@ export async function checkWorldInfo(chat, maxContext, isDryRun) { console.log(`[WI] Adding ${allActivatedEntries.size} entries to prompt`, Array.from(allActivatedEntries.values())); console.debug('[WI] --- DONE ---'); - return { worldInfoBefore, worldInfoAfter, EMEntries, WIDepthEntries, allActivatedEntries: allActivatedEntries.values() }; + return { worldInfoBefore, worldInfoAfter, EMEntries, WIDepthEntries, allActivatedEntries: new Set(allActivatedEntries.values()) }; } /**