Add WI toggle to include/exclude names in scanning

This commit is contained in:
Wolfsblvt
2024-07-06 03:23:02 +02:00
parent 13630c896a
commit ff23808d3b
4 changed files with 22 additions and 3 deletions

View File

@ -35,6 +35,7 @@ import {
setWorldInfoButtonClass,
importWorldInfo,
wi_anchor_position,
world_info_include_names,
} from './scripts/world-info.js';
import {
@ -3500,7 +3501,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
// Add WI to prompt (and also inject WI to AN value via hijack)
// Make quiet prompt available for WIAN
setExtensionPrompt('QUIET_PROMPT', quiet_prompt || '', extension_prompt_types.IN_PROMPT, 0, true);
const chatForWI = coreChat.map(x => `${x.name}: ${x.mes}`).reverse();
const chatForWI = coreChat.map(x => world_info_include_names ? `${x.name}: ${x.mes}` : x.mes).reverse();
const { worldInfoString, worldInfoBefore, worldInfoAfter, worldInfoExamples, worldInfoDepth } = await getWorldInfoPrompt(chatForWI, this_max_context, dryRun);
setExtensionPrompt('QUIET_PROMPT', '', extension_prompt_types.IN_PROMPT, 0, true);