diff --git a/public/script.js b/public/script.js index 48841d055..5ccd253a4 100644 --- a/public/script.js +++ b/public/script.js @@ -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],