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