Merge pull request #3418 from pcpthm/fix-reasoning-duplicated Fix reasoning is duplicated when a continue generation is interrupted

524ecf8acd11282ce2768c3a3edc1b1b4769539d

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

Signed
1 files changed, +1 -1Showing whitespace changes
public/script.js+1 -1
@@ -6049,7 +6049,7 @@ export async function saveReply(type, getMessage, fromStreaming, title, swipes,
60496049 chat[chat.length - 1]['send_date'] = getMessageTimeStamp();
60506050 chat[chat.length - 1]['extra']['api'] = getGeneratingApi();
60516051 chat[chat.length - 1]['extra']['model'] = getGeneratingModel();
60526052 chat[chat.length - 1]['extra']['reasoning'] += reasoning;
60536053 if (power_user.message_token_count_enabled) {
60546054 const tokenCountText = (reasoning || '') + chat[chat.length - 1]['mes'];
60556055 chat[chat.length - 1]['extra']['token_count'] = await getTokenCountAsync(tokenCountText, 0);