mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Simplify anchor selection code
This commit is contained in:
@ -1395,26 +1395,26 @@ async function Generate(type, automatic_trigger, force_name2) {
|
|||||||
|
|
||||||
let storyString = "";
|
let storyString = "";
|
||||||
let finalPromt = "";
|
let finalPromt = "";
|
||||||
let postAnchorChar = "Elaborate speaker";
|
|
||||||
let postAnchorStyle = "Writing style: very long messages";//"[Genre: roleplay chat][Tone: very long messages with descriptions]";
|
|
||||||
let anchorTop = '';
|
let anchorTop = '';
|
||||||
let anchorBottom = '';
|
let anchorBottom = '';
|
||||||
const topAnchorDepth = 8;
|
const topAnchorDepth = 8;
|
||||||
|
|
||||||
if (character_anchor && !is_pygmalion) {
|
// Compute anchors
|
||||||
|
if (!is_pygmalion) {
|
||||||
console.log('saw not pyg');
|
console.log('saw not pyg');
|
||||||
|
|
||||||
|
let postAnchorChar = character_anchor ? name2 + " Elaborate speaker" : "";
|
||||||
|
let postAnchorStyle = style_anchor ? "Writing style: very long messages" : "";
|
||||||
if (anchor_order === 0) {
|
if (anchor_order === 0) {
|
||||||
anchorTop = name2 + " " + postAnchorChar;
|
anchorTop = postAnchorChar;
|
||||||
} else {
|
anchorBottom = postAnchorStyle;
|
||||||
console.log('saw pyg, adding anchors')
|
} else { // anchor_order === 1
|
||||||
anchorBottom = "[" + name2 + " " + postAnchorChar + "]";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (style_anchor && !is_pygmalion) {
|
|
||||||
if (anchor_order === 1) {
|
|
||||||
anchorTop = postAnchorStyle;
|
anchorTop = postAnchorStyle;
|
||||||
} else {
|
anchorBottom = postAnchorChar;
|
||||||
anchorBottom = "[" + postAnchorStyle + "]";
|
}
|
||||||
|
|
||||||
|
if (anchorBottom) {
|
||||||
|
anchorBottom = "[" + anchorBottom + "]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user