Merge pull request #3591 from SillyTavern/revert-3587-fix-miscounted-messages-on-generate-and-swipe Revert "Account for generated depth on non-continue"

696a9992389bca7ec24c3e2c5acd67b8d13d13ff

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +2 -2Showing whitespace changes
public/script.js+2 -2
@@ -3866,7 +3866,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
38663866 coreChat = await Promise.all(coreChat.map(async (chatItem, index) => {
38673867 let message = chatItem.mes;
38683868 let regexType = chatItem.is_user ? regex_placement.USER_INPUT : regex_placement.AI_OUTPUT;
38693869 let options = { isPrompt: true, depth: (coreChat.length - index - (isContinue ? 1 : 0)) };
38703870
38713871 let regexedMessage = getRegexedString(message, regexType, options);
38723872 regexedMessage = await appendFileContent(chatItem, regexedMessage);
@@ -3884,7 +3884,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
38843884
38853885 const reasoning = new PromptReasoning();
38863886 for (let i = coreChat.length - 1; i >= 0; i--) {
38873887 const depth = coreChat.length - i - (isContinue ? 1 : 0);
38883888 const isPrefix = isContinue && i === coreChat.length - 1;
38893889 coreChat[i] = {
38903890 ...coreChat[i],