From c4be4d7d613131cc6a2a2fc40af3c083c792bc2b Mon Sep 17 00:00:00 2001 From: pcpthm Date: Mon, 3 Feb 2025 21:07:49 +0900 Subject: [PATCH] Fix reasoning duplicated when continue is interrupted --- public/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index e6ce5bc03..e4cb321dc 100644 --- a/public/script.js +++ b/public/script.js @@ -6049,7 +6049,7 @@ export async function saveReply(type, getMessage, fromStreaming, title, swipes, chat[chat.length - 1]['send_date'] = getMessageTimeStamp(); chat[chat.length - 1]['extra']['api'] = getGeneratingApi(); chat[chat.length - 1]['extra']['model'] = getGeneratingModel(); - chat[chat.length - 1]['extra']['reasoning'] += reasoning; + chat[chat.length - 1]['extra']['reasoning'] = reasoning; if (power_user.message_token_count_enabled) { const tokenCountText = (reasoning || '') + chat[chat.length - 1]['mes']; chat[chat.length - 1]['extra']['token_count'] = await getTokenCountAsync(tokenCountText, 0);