mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix extra space in the prompt before top anchor if personality is missing
This commit is contained in:
@ -1682,9 +1682,9 @@ async function Generate(type, automatic_trigger, force_name2) {
|
|||||||
is_add_personality = true;
|
is_add_personality = true;
|
||||||
//chatString = chatString.substr(0,chatString.length-1);
|
//chatString = chatString.substr(0,chatString.length-1);
|
||||||
//anchorAndPersonality = "[Genre: roleplay chat][Tone: very long messages with descriptions]";
|
//anchorAndPersonality = "[Genre: roleplay chat][Tone: very long messages with descriptions]";
|
||||||
if ((anchorTop != "" || charPersonality != "") && !is_pygmalion) {
|
let personalityAndAnchor = [ charPersonality, anchorTop ].filter(x => x).join(' ');
|
||||||
if (anchorTop != "") charPersonality += ' ';
|
if (personalityAndAnchor && !is_pygmalion) {
|
||||||
item += "[" + charPersonality + anchorTop + ']\n';
|
item += "[" + personalityAndAnchor + ']\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i >= arrMes.length - 1 && count_view_mes > 8 && $.trim(item).substr(0, (name1 + ":").length) == name1 + ":" && !is_pygmalion) {//For add anchor in end
|
if (i >= arrMes.length - 1 && count_view_mes > 8 && $.trim(item).substr(0, (name1 + ":").length) == name1 + ":" && !is_pygmalion) {//For add anchor in end
|
||||||
|
Reference in New Issue
Block a user