mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fixed extension prompt insertion at depth 1
This commit is contained in:
@ -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);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user