mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Don't reassign thisPromptBits
Instead, just use additionalPromptStuff where thisPromptBits was used after the assignment.
This commit is contained in:
@@ -4016,16 +4016,14 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu
|
|||||||
userPersona: (power_user.persona_description || ''),
|
userPersona: (power_user.persona_description || ''),
|
||||||
};
|
};
|
||||||
|
|
||||||
thisPromptBits = additionalPromptStuff;
|
//console.log(additionalPromptStuff);
|
||||||
|
const itemizedIndex = itemizedPrompts.findIndex((item) => item.mesId === additionalPromptStuff.mesId);
|
||||||
//console.log(thisPromptBits);
|
|
||||||
const itemizedIndex = itemizedPrompts.findIndex((item) => item.mesId === thisPromptBits['mesId']);
|
|
||||||
|
|
||||||
if (itemizedIndex !== -1) {
|
if (itemizedIndex !== -1) {
|
||||||
itemizedPrompts[itemizedIndex] = thisPromptBits;
|
itemizedPrompts[itemizedIndex] = additionalPromptStuff;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
itemizedPrompts.push(thisPromptBits);
|
itemizedPrompts.push(additionalPromptStuff);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.debug(`pushed prompt bits to itemizedPrompts array. Length is now: ${itemizedPrompts.length}`);
|
console.debug(`pushed prompt bits to itemizedPrompts array. Length is now: ${itemizedPrompts.length}`);
|
||||||
|
Reference in New Issue
Block a user