From 80a640606216826631b06247f8dc9d54c0e2d532 Mon Sep 17 00:00:00 2001 From: valadaptive Date: Thu, 25 Apr 2024 08:42:33 -0400 Subject: [PATCH] Don't reassign thisPromptBits Instead, just use additionalPromptStuff where thisPromptBits was used after the assignment. --- public/script.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/public/script.js b/public/script.js index 5c27aa28e..e1d4215bf 100644 --- a/public/script.js +++ b/public/script.js @@ -4016,16 +4016,14 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu userPersona: (power_user.persona_description || ''), }; - thisPromptBits = additionalPromptStuff; - - //console.log(thisPromptBits); - const itemizedIndex = itemizedPrompts.findIndex((item) => item.mesId === thisPromptBits['mesId']); + //console.log(additionalPromptStuff); + const itemizedIndex = itemizedPrompts.findIndex((item) => item.mesId === additionalPromptStuff.mesId); if (itemizedIndex !== -1) { - itemizedPrompts[itemizedIndex] = thisPromptBits; + itemizedPrompts[itemizedIndex] = additionalPromptStuff; } else { - itemizedPrompts.push(thisPromptBits); + itemizedPrompts.push(additionalPromptStuff); } console.debug(`pushed prompt bits to itemizedPrompts array. Length is now: ${itemizedPrompts.length}`);