Undo second substitution #2874

90169858274431ed4cdf8bc0cb9ab9c2fba7df6c

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

1 files changed, +1 -3Showing whitespace changes
public/scripts/world-info.js+1 -3
@@ -4125,9 +4125,7 @@ export async function checkWorldInfo(chat, maxContext, isDryRun) {
4125 // TODO (kingbri): Change to use WI Anchor positioning instead of separate top/bottom arrays4125 // TODO (kingbri): Change to use WI Anchor positioning instead of separate top/bottom arrays
4126 [...allActivatedEntries].sort(sortFn).forEach((entry) => {4126 [...allActivatedEntries].sort(sortFn).forEach((entry) => {
4127 const regexDepth = entry.position === world_info_position.atDepth ? (entry.depth ?? DEFAULT_DEPTH) : null;4127 const regexDepth = entry.position === world_info_position.atDepth ? (entry.depth ?? DEFAULT_DEPTH) : null;
4128 const content = substituteParams(4128 const content = getRegexedString(entry.content, regex_placement.WORLD_INFO, { depth: regexDepth, isMarkdown: false, isPrompt: true });
4129 getRegexedString(entry.content, regex_placement.WORLD_INFO, { depth: regexDepth, isMarkdown: false, isPrompt: true })
4130 );
41314129
4132 if (!content) {4130 if (!content) {
4133 console.debug(`[WI] Entry ${entry.uid}`, 'skipped adding to prompt due to empty content', entry);4131 console.debug(`[WI] Entry ${entry.uid}`, 'skipped adding to prompt due to empty content', entry);