mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-04-26 16:38:43 +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();
|
||||||
@ -2487,7 +2484,7 @@ function showStopButton() {
|
|||||||
|
|
||||||
function hideStopButton() {
|
function hideStopButton() {
|
||||||
// prevent NOOP, because hideStopButton() gets called multiple times
|
// prevent NOOP, because hideStopButton() gets called multiple times
|
||||||
if($('#mes_stop').css('display') !== 'none') {
|
if ($('#mes_stop').css('display') !== 'none') {
|
||||||
$('#mes_stop').css({ 'display': 'none' });
|
$('#mes_stop').css({ 'display': 'none' });
|
||||||
eventSource.emit(event_types.GENERATION_ENDED, chat.length);
|
eventSource.emit(event_types.GENERATION_ENDED, chat.length);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user