Fix reasoning duplicated when continue is interrupted

c4be4d7d613131cc6a2a2fc40af3c083c792bc2b

pcpthm <pcpthm@gmail.com>

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,
6049 chat[chat.length - 1]['send_date'] = getMessageTimeStamp();6049 chat[chat.length - 1]['send_date'] = getMessageTimeStamp();
6050 chat[chat.length - 1]['extra']['api'] = getGeneratingApi();6050 chat[chat.length - 1]['extra']['api'] = getGeneratingApi();
6051 chat[chat.length - 1]['extra']['model'] = getGeneratingModel();6051 chat[chat.length - 1]['extra']['model'] = getGeneratingModel();
6052 chat[chat.length - 1]['extra']['reasoning'] += reasoning;6052 chat[chat.length - 1]['extra']['reasoning'] = reasoning;
6053 if (power_user.message_token_count_enabled) {6053 if (power_user.message_token_count_enabled) {
6054 const tokenCountText = (reasoning || '') + chat[chat.length - 1]['mes'];6054 const tokenCountText = (reasoning || '') + chat[chat.length - 1]['mes'];
6055 chat[chat.length - 1]['extra']['token_count'] = await getTokenCountAsync(tokenCountText, 0);6055 chat[chat.length - 1]['extra']['token_count'] = await getTokenCountAsync(tokenCountText, 0);