Fix isPrefix for continue on reasoning

This commit is contained in:
Cohee
2025-03-12 23:55:16 +02:00
parent 12824bb680
commit 160f7431d6

View File

@ -3959,7 +3959,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 isPrefix = isContinue && i === coreChat.length - (isContinue ? 2 : 1);
const isPrefix = isContinue && i === coreChat.length - 1;
coreChat[i] = {
...coreChat[i],
mes: promptReasoning.addToMessage(