| 4125 | // TODO (kingbri): Change to use WI Anchor positioning instead of separate top/bottom arrays | 4125 | // 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 = 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 | ); |
| 4129 | | 4131 | |
| 4130 | if (!content) { | 4132 | if (!content) { |
| 4131 | console.debug(`[WI] Entry ${entry.uid}`, 'skipped adding to prompt due to empty content', entry); | 4133 | console.debug(`[WI] Entry ${entry.uid}`, 'skipped adding to prompt due to empty content', entry); |