Move reasoning continue regex depth adjustment

This commit is contained in:
Cohee
2025-03-12 23:59:53 +02:00
parent 160f7431d6
commit 37819df542

View File

@ -3958,7 +3958,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
const promptReasoning = new PromptReasoning();
for (let i = coreChat.length - 1; i >= 0; i--) {
const depth = coreChat.length - i - 1;
const depth = coreChat.length - i - (isContinue ? 2 : 1);
const isPrefix = isContinue && i === coreChat.length - 1;
coreChat[i] = {
...coreChat[i],