mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix trailing stopping strings removal
This commit is contained in:
@ -4399,7 +4399,7 @@ function cleanUpMessage(getMessage, isImpersonate, isContinue, displayIncomplete
|
||||
|
||||
for (const stoppingString of stoppingStrings) {
|
||||
if (stoppingString.length) {
|
||||
for (let j = stoppingString.length - 1; j > 0; j--) {
|
||||
for (let j = stoppingString.length; j > 0; j--) {
|
||||
if (getMessage.slice(-j) === stoppingString.slice(0, j)) {
|
||||
getMessage = getMessage.slice(0, -j);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user