Typing fixes to avoid breaking any APIs

7fd798b854fe142c04dd08f5ec6a08c8bc568e0b

Honey Tree <kalakanlogs@proton.me>

1 files changed, +3 -3Ignore whitespace
public/scripts/world-info.js+3 -3
@@ -3704,7 +3704,7 @@ function parseDecorators(content) {
3704 * @param {string[]} chat The chat messages to scan, in reverse order.3704 * @param {string[]} chat The chat messages to scan, in reverse order.
3705 * @param {number} maxContext The maximum context size of the generation.3705 * @param {number} maxContext The maximum context size of the generation.
3706 * @param {boolean} isDryRun Whether to perform a dry run.3706 * @param {boolean} isDryRun Whether to perform a dry run.
3707 * @typedef {{ worldInfoBefore: string, worldInfoAfter: string, EMEntries: any[], WIDepthEntries: any[], allActivatedEntries: Map<string, any> }} WIActivated3707 * @typedef {{ worldInfoBefore: string, worldInfoAfter: string, EMEntries: any[], WIDepthEntries: any[], allActivatedEntries: Set<any> }} WIActivated
3708 * @returns {Promise<WIActivated>} The world info activated.3708 * @returns {Promise<WIActivated>} The world info activated.
3709 */3709 */
3710export async function checkWorldInfo(chat, maxContext, isDryRun) {3710export async function checkWorldInfo(chat, maxContext, isDryRun) {
@@ -3748,7 +3748,7 @@ export async function checkWorldInfo(chat, maxContext, isDryRun) {
3748 !isDryRun && timedEffects.checkTimedEffects();3748 !isDryRun && timedEffects.checkTimedEffects();
37493749
3750 if (sortedEntries.length === 0) {3750 if (sortedEntries.length === 0) {
3751 return { worldInfoBefore: '', worldInfoAfter: '', WIDepthEntries: [], EMEntries: [], allActivatedEntries: new Map() };3751 return { worldInfoBefore: '', worldInfoAfter: '', WIDepthEntries: [], EMEntries: [], allActivatedEntries: new Set() };
3752 }3752 }
37533753
3754 /** @type {number[]} Represents the delay levels for entries that are delayed until recursion */3754 /** @type {number[]} Represents the delay levels for entries that are delayed until recursion */
@@ -4195,7 +4195,7 @@ export async function checkWorldInfo(chat, maxContext, isDryRun) {
4195 console.log(`[WI] Adding ${allActivatedEntries.size} entries to prompt`, Array.from(allActivatedEntries.values()));4195 console.log(`[WI] Adding ${allActivatedEntries.size} entries to prompt`, Array.from(allActivatedEntries.values()));
4196 console.debug('[WI] --- DONE ---');4196 console.debug('[WI] --- DONE ---');
41974197
4198 return { worldInfoBefore, worldInfoAfter, EMEntries, WIDepthEntries, allActivatedEntries: allActivatedEntries.values() };4198 return { worldInfoBefore, worldInfoAfter, EMEntries, WIDepthEntries, allActivatedEntries: new Set(allActivatedEntries.values()) };
4199}4199}
42004200
4201/**4201/**