diff --git a/public/script.js b/public/script.js index 476087009..c39fc9621 100644 --- a/public/script.js +++ b/public/script.js @@ -2801,11 +2801,11 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, return; } - const anchorDepth = Math.abs(index - finalMesSend.length + 1); + const anchorDepth = Math.abs(index - finalMesSend.length); // NOTE: Depth injected here! const extensionAnchor = getExtensionPrompt(extension_prompt_types.IN_CHAT, anchorDepth); - if (anchorDepth > 0 && extensionAnchor && extensionAnchor.length) { + if (anchorDepth >= 0 && extensionAnchor && extensionAnchor.length) { mesItem.extensionPrompts.push(extensionAnchor); } });