Fix {{original}} macro left out if original is empty

This commit is contained in:
Cohee 2023-12-07 01:27:55 +02:00
parent 1683b76c65
commit 24aff67d50

View File

@ -1049,7 +1049,7 @@ class PromptManager {
const groupMembers = this.getActiveGroupCharacters();
const preparedPrompt = new Prompt(prompt);
if (original) {
if (typeof original === 'string') {
if (0 < groupMembers.length) preparedPrompt.content = substituteParams(prompt.content ?? '', null, null, original, groupMembers.join(', '));
else preparedPrompt.content = substituteParams(prompt.content, null, null, original);
} else {