Clean-up swipe_info of multi-swipes
| @@ -3346,11 +3346,15 @@ class StreamingProcessor { | |||
| 3346 | 3346 | ||
| 3347 | if (Array.isArray(this.swipes) && this.swipes.length > 0) { | 3347 | if (Array.isArray(this.swipes) && this.swipes.length > 0) { |
| 3348 | const message = chat[messageId]; | 3348 | const message = chat[messageId]; |
| 3349 | const swipeInfoExtra = structuredClone(message.extra); | ||
| 3350 | delete swipeInfoExtra.token_count; | ||
| 3351 | delete swipeInfoExtra.reasoning; | ||
| 3352 | delete swipeInfoExtra.reasoning_duration; | ||
| 3349 | const swipeInfo = { | 3353 | const swipeInfo = { |
| 3350 | send_date: message.send_date, | 3354 | send_date: message.send_date, |
| 3351 | gen_started: message.gen_started, | 3355 | gen_started: message.gen_started, |
| 3352 | gen_finished: message.gen_finished, | 3356 | gen_finished: message.gen_finished, |
| 3353 | extra: structuredClone(message.extra), | 3357 | extra: swipeInfoExtra, |
| 3354 | }; | 3358 | }; |
| 3355 | const swipeInfoArray = []; | 3359 | const swipeInfoArray = []; |
| 3356 | swipeInfoArray.length = this.swipes.length; | 3360 | swipeInfoArray.length = this.swipes.length; |
| @@ -6118,11 +6122,15 @@ export async function saveReply(type, getMessage, fromStreaming, title, swipes, | |||
| 6118 | } | 6122 | } |
| 6119 | 6123 | ||
| 6120 | if (Array.isArray(swipes) && swipes.length > 0) { | 6124 | if (Array.isArray(swipes) && swipes.length > 0) { |
| 6125 | const swipeInfoExtra = structuredClone(item.extra); | ||
| 6126 | delete swipeInfoExtra.token_count; | ||
| 6127 | delete swipeInfoExtra.reasoning; | ||
| 6128 | delete swipeInfoExtra.reasoning_duration; | ||
| 6121 | const swipeInfo = { | 6129 | const swipeInfo = { |
| 6122 | send_date: item.send_date, | 6130 | send_date: item.send_date, |
| 6123 | gen_started: item.gen_started, | 6131 | gen_started: item.gen_started, |
| 6124 | gen_finished: item.gen_finished, | 6132 | gen_finished: item.gen_finished, |
| 6125 | extra: structuredClone(item.extra), | 6133 | extra: swipeInfoExtra, |
| 6126 | }; | 6134 | }; |
| 6127 | const swipeInfoArray = []; | 6135 | const swipeInfoArray = []; |
| 6128 | swipeInfoArray.length = swipes.length; | 6136 | swipeInfoArray.length = swipes.length; |