Merge pull request #2874 from steve02081504/patch-1 Second macro evaluation of WI for all positions

e2a3a060dd750c675ac9d96b9b9daa0a17cc4a6d

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

Signed
1 files changed, +5 -3Ignore whitespace
public/scripts/world-info.js+5 -3
@@ -4125,7 +4125,9 @@ export async function checkWorldInfo(chat, maxContext, isDryRun) {
41254125 // TODO (kingbri): Change to use WI Anchor positioning instead of separate top/bottom arrays
41264126 [...allActivatedEntries].sort(sortFn).forEach((entry) => {
41274127 const regexDepth = entry.position === world_info_position.atDepth ? (entry.depth ?? DEFAULT_DEPTH) : null;
4128- const content = getRegexedString(entry.content, regex_placement.WORLD_INFO, { depth: regexDepth, isMarkdown: false, isPrompt: true });
4128+ const content = substituteParams(
4129+ getRegexedString(entry.content, regex_placement.WORLD_INFO, { depth: regexDepth, isMarkdown: false, isPrompt: true })
4130+ );
41294131
41304132 if (!content) {
41314133 console.debug(`[WI] Entry ${entry.uid}`, 'skipped adding to prompt due to empty content', entry);
@@ -4134,10 +4136,10 @@ export async function checkWorldInfo(chat, maxContext, isDryRun) {
41344136
41354137 switch (entry.position) {
41364138 case world_info_position.before:
41374139 WIBeforeEntries.unshift(substituteParams(content));
41384140 break;
41394141 case world_info_position.after:
41404142 WIAfterEntries.unshift(substituteParams(content));
41414143 break;
41424144 case world_info_position.EMTop:
41434145 EMEntries.unshift(