mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-18 21:20:39 +01:00
Fix cfgMessage handling
This commit is contained in:
parent
3fe3430006
commit
d2cc8b36b8
@ -4467,10 +4467,13 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
|
||||
// TODO: Make all extension prompts use an array/splice method
|
||||
const lengthDiff = mesSend.length - cfgPrompt.depth;
|
||||
const cfgDepth = lengthDiff >= 0 ? lengthDiff : 0;
|
||||
if (!Array.isArray(finalMesSend[cfgDepth].extensionPrompts)) {
|
||||
finalMesSend[cfgDepth].extensionPrompts = [];
|
||||
const cfgMessage = finalMesSend[cfgDepth];
|
||||
if (cfgMessage) {
|
||||
if (!Array.isArray(finalMesSend[cfgDepth].extensionPrompts)) {
|
||||
finalMesSend[cfgDepth].extensionPrompts = [];
|
||||
}
|
||||
finalMesSend[cfgDepth].extensionPrompts.push(`${cfgPrompt.value}\n`);
|
||||
}
|
||||
finalMesSend[cfgDepth].extensionPrompts.push(`${cfgPrompt.value}\n`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user