Add default global scan data for checkWorldInfo

4177c829d16e9b6e5d98be4f03465de08085adcd

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +12 -1Ignore whitespace
public/scripts/world-info.js+12 -1
@@ -178,6 +178,17 @@ const KNOWN_DECORATORS = ['@@activate', '@@dont_activate'];
178178 */
179179// End typedef area
180180
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+
181192/**
182193 * Represents a scanning buffer for one evaluation of World Info.
183194 */
@@ -4202,7 +4213,7 @@ function parseDecorators(content) {
42024213 * @returns {Promise<WIActivated>} The world info activated.
42034214 */
42044215//MARK: checkWorldInfo
42054216export async function checkWorldInfo(chat, maxContext, isDryRun, globalScanData = defaultGlobalScanData) {
42064217 const context = getContext();
42074218 const buffer = new WorldInfoBuffer(chat, globalScanData);
42084219