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