mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-01 03:47:12 +01:00
Don't trim names in message prefixes if allowed with settings
Closes #2666
This commit is contained in:
parent
fc02898a97
commit
9cca368c12
@ -5426,9 +5426,11 @@ export function cleanUpMessage(getMessage, isImpersonate, isContinue, displayInc
|
||||
getMessage = fixMarkdown(getMessage, false);
|
||||
}
|
||||
|
||||
const nameToTrim2 = isImpersonate ? name1 : name2;
|
||||
const nameToTrim2 = isImpersonate
|
||||
? (!power_user.allow_name1_display ? name1 : '')
|
||||
: (!power_user.allow_name2_display ? name2 : '');
|
||||
|
||||
if (getMessage.startsWith(nameToTrim2 + ':')) {
|
||||
if (nameToTrim2 && getMessage.startsWith(nameToTrim2 + ':')) {
|
||||
getMessage = getMessage.replace(nameToTrim2 + ':', '');
|
||||
getMessage = getMessage.trimStart();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user