Typing fixes to avoid breaking any APIs
This commit is contained in:
parent
6efa36bdbf
commit
7fd798b854
|
@ -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<string, any> }} WIActivated
|
||||
* @typedef {{ worldInfoBefore: string, worldInfoAfter: string, EMEntries: any[], WIDepthEntries: any[], allActivatedEntries: Set<any> }} WIActivated
|
||||
* @returns {Promise<WIActivated>} 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()) };
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue