mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Dont count Continue as message 0 (#3594)
* continue works same as swipe continued message isn't depth counted * correct early-out check * update regex depth setting tooltips for accuracy * update max tooltip * remove redundant check * Allow -1 as a min depth value --------- Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
This commit is contained in:
@ -3940,7 +3940,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
|
||||
coreChat = await Promise.all(coreChat.map(async (chatItem, index) => {
|
||||
let message = chatItem.mes;
|
||||
let regexType = chatItem.is_user ? regex_placement.USER_INPUT : regex_placement.AI_OUTPUT;
|
||||
let options = { isPrompt: true, depth: (coreChat.length - index - 1) };
|
||||
let options = { isPrompt: true, depth: (coreChat.length - index - (isContinue ? 2 : 1)) };
|
||||
|
||||
let regexedMessage = getRegexedString(message, regexType, options);
|
||||
regexedMessage = await appendFileContent(chatItem, regexedMessage);
|
||||
@ -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 - 1;
|
||||
const isPrefix = isContinue && i === coreChat.length - (isContinue ? 2 : 1);
|
||||
coreChat[i] = {
|
||||
...coreChat[i],
|
||||
mes: promptReasoning.addToMessage(
|
||||
|
Reference in New Issue
Block a user