Fix cfgMessage handling

d2cc8b36b8c2f2e3d81b3c76a852250d37a52615

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -0Showing whitespace changes
public/script.js+3 -0
@@ -4467,6 +4467,8 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
44674467 // TODO: Make all extension prompts use an array/splice method
44684468 const lengthDiff = mesSend.length - cfgPrompt.depth;
44694469 const cfgDepth = lengthDiff >= 0 ? lengthDiff : 0;
4470+ const cfgMessage = finalMesSend[cfgDepth];
4471+ if (cfgMessage) {
44704472 if (!Array.isArray(finalMesSend[cfgDepth].extensionPrompts)) {
44714473 finalMesSend[cfgDepth].extensionPrompts = [];
44724474 }
@@ -4474,6 +4476,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
44744476 }
44754477 }
44764478 }
4479+ }
44774480
44784481 // Add prompt bias after everything else
44794482 // Always run with continue