mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix missing space before the bottom anchor
This commit is contained in:
@@ -1870,13 +1870,15 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||||||
//anchorAndPersonality = "[Genre: roleplay chat][Tone: very long messages with descriptions]";
|
//anchorAndPersonality = "[Genre: roleplay chat][Tone: very long messages with descriptions]";
|
||||||
let personalityAndAnchor = [charPersonality, anchorTop].filter(x => x).join(' ');
|
let personalityAndAnchor = [charPersonality, anchorTop].filter(x => x).join(' ');
|
||||||
if (personalityAndAnchor) {
|
if (personalityAndAnchor) {
|
||||||
item += "[" + personalityAndAnchor + ']\n';
|
item += "[" + personalityAndAnchor + "]\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i === arrMes.length - 1 && coreChat.length > bottomAnchorThreshold && item.trim().startsWith(name1 + ":") && !is_pygmalion) {//For add anchor in end
|
if (i === arrMes.length - 1 && coreChat.length > bottomAnchorThreshold && item.trim().startsWith(name1 + ":") && !is_pygmalion) {//For add anchor in end
|
||||||
item = item.substr(0, item.length - 1);
|
|
||||||
//chatString+=postAnchor+"\n";//"[Writing style: very long messages]\n";
|
//chatString+=postAnchor+"\n";//"[Writing style: very long messages]\n";
|
||||||
item = item + anchorBottom + "\n";
|
if (anchorBottom) {
|
||||||
|
item = item.replace(/\n$/, " ");
|
||||||
|
item += anchorBottom + "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (is_pygmalion) {
|
if (is_pygmalion) {
|
||||||
if (i === arrMes.length - 1 && item.trim().startsWith(name1 + ":")) {//for add name2 when user sent
|
if (i === arrMes.length - 1 && item.trim().startsWith(name1 + ":")) {//for add name2 when user sent
|
||||||
|
Reference in New Issue
Block a user