make decorator only parse once
| @@ -3647,7 +3647,10 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | ||
| 3647 | 3647 | for (let entry of sortedEntries) { |
| 3648 | 3648 | |
| 3649 | 3649 | //oarse decorators |
| 3650 | 3650 | const [decorators, content] = parseDecorators(entry.content); |
| 3651 | + entry.decorators = decorators; | |
| 3652 | + entry.content = content; | |
| 3653 | + | |
| 3651 | 3654 | if(decorators.includes('@@activate')){ |
| 3652 | 3655 | //activate in any case |
| 3653 | 3656 | activatedNow.add(entry); |
| @@ -3820,7 +3823,7 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | ||
| 3820 | 3823 | } else { console.debug(`uid:${entry.uid} passed probability check, inserting to prompt`); } |
| 3821 | 3824 | |
| 3822 | 3825 | // Substitute macros inline, for both this checking and also future processing |
| 3823 | 3826 | entry.content = substituteParams(parseDecorators(entry.content)[1]); |
| 3824 | 3827 | newContent += `${entry.content}\n`; |
| 3825 | 3828 | |
| 3826 | 3829 | if ((textToScanTokens + (await getTokenCountAsync(newContent))) >= budget) { |