From dedb913b67cbbf9800903d51ddc6e0f587867710 Mon Sep 17 00:00:00 2001 From: ThisIsPIRI Date: Wed, 12 Jul 2023 06:57:05 +0900 Subject: [PATCH] Fix continue formatting --- public/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index 2cf55464d..ccc844884 100644 --- a/public/script.js +++ b/public/script.js @@ -2263,9 +2263,9 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, chat2[i] = formatMessageHistoryItem(coreChat[j], isInstruct); - // Do not format the message for continuation + // Do not suffix the message for continuation if (i === 0 && type == 'continue') { - chat2[i] = coreChat[j].mes; + chat2[i] = chat2[i].slice(0, chat2[i].lastIndexOf(coreChat[j].mes) + coreChat[j].mes.length); } }