Add default global scan data for checkWorldInfo
| @@ -178,6 +178,17 @@ const KNOWN_DECORATORS = ['@@activate', '@@dont_activate']; | |||
| 178 | */ | 178 | */ |
| 179 | // End typedef area | 179 | // End typedef area |
| 180 | 180 | ||
| 181 | /** @type {Readonly<WIGlobalScanData>} */ | ||
| 182 | const defaultGlobalScanData = Object.freeze({ | ||
| 183 | trigger: 'normal', | ||
| 184 | personaDescription: '', | ||
| 185 | characterDescription: '', | ||
| 186 | characterPersonality: '', | ||
| 187 | characterDepthPrompt: '', | ||
| 188 | scenario: '', | ||
| 189 | creatorNotes: '', | ||
| 190 | }); | ||
| 191 | |||
| 181 | /** | 192 | /** |
| 182 | * Represents a scanning buffer for one evaluation of World Info. | 193 | * Represents a scanning buffer for one evaluation of World Info. |
| 183 | */ | 194 | */ |
| @@ -4202,7 +4213,7 @@ function parseDecorators(content) { | |||
| 4202 | * @returns {Promise<WIActivated>} The world info activated. | 4213 | * @returns {Promise<WIActivated>} The world info activated. |
| 4203 | */ | 4214 | */ |
| 4204 | //MARK: checkWorldInfo | 4215 | //MARK: checkWorldInfo |
| 4205 | export async function checkWorldInfo(chat, maxContext, isDryRun, globalScanData) { | 4216 | export async function checkWorldInfo(chat, maxContext, isDryRun, globalScanData = defaultGlobalScanData) { |
| 4206 | const context = getContext(); | 4217 | const context = getContext(); |
| 4207 | const buffer = new WorldInfoBuffer(chat, globalScanData); | 4218 | const buffer = new WorldInfoBuffer(chat, globalScanData); |
| 4208 | 4219 | ||