make decorator only parse once

33347f1c7c74da7d45c903fc00636b63d67b144c

kwaroran <amasio1234@proton.me>

1 files changed, +5 -2Ignore whitespace
public/scripts/world-info.js+5 -2
@@ -3647,7 +3647,10 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
36473647 for (let entry of sortedEntries) {
36483648
36493649 //oarse decorators
36503650 const [decorators, content] = parseDecorators(entry.content);
3651+ entry.decorators = decorators;
3652+ entry.content = content;
3653+
36513654 if(decorators.includes('@@activate')){
36523655 //activate in any case
36533656 activatedNow.add(entry);
@@ -3820,7 +3823,7 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
38203823 } else { console.debug(`uid:${entry.uid} passed probability check, inserting to prompt`); }
38213824
38223825 // Substitute macros inline, for both this checking and also future processing
38233826 entry.content = substituteParams(parseDecorators(entry.content)[1]);
38243827 newContent += `${entry.content}\n`;
38253828
38263829 if ((textToScanTokens + (await getTokenCountAsync(newContent))) >= budget) {