mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix {{original}}
This commit is contained in:
@@ -2163,12 +2163,9 @@ function scrollChatToBottom() {
|
||||
function substituteParams(content, _name1, _name2, _original, _group, _replaceCharacterCard = true) {
|
||||
const environment = {};
|
||||
|
||||
let substitutedOriginal = false;
|
||||
environment.original = () => {
|
||||
// Only substitute {{original}} on its first occurrence
|
||||
if (substitutedOriginal || typeof _original !== 'string') return '';
|
||||
return _original;
|
||||
};
|
||||
if (typeof _original === 'string') {
|
||||
environment.original = _original;
|
||||
}
|
||||
|
||||
if (_replaceCharacterCard) {
|
||||
const fields = getCharacterCardFields();
|
||||
|
Reference in New Issue
Block a user