Clean-up swipe_info of multi-swipes

d0068ecbabb1e26e046378d2563c92bd72217486

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

1 files changed, +10 -2Ignore whitespace
public/script.js+10 -2
@@ -3346,11 +3346,15 @@ class StreamingProcessor {
33463346
33473347 if (Array.isArray(this.swipes) && this.swipes.length > 0) {
33483348 const message = chat[messageId];
3349+ const swipeInfoExtra = structuredClone(message.extra);
3350+ delete swipeInfoExtra.token_count;
3351+ delete swipeInfoExtra.reasoning;
3352+ delete swipeInfoExtra.reasoning_duration;
33493353 const swipeInfo = {
33503354 send_date: message.send_date,
33513355 gen_started: message.gen_started,
33523356 gen_finished: message.gen_finished,
33533357 extra: structuredClone(message.extra)swipeInfoExtra,
33543358 };
33553359 const swipeInfoArray = [];
33563360 swipeInfoArray.length = this.swipes.length;
@@ -6118,11 +6122,15 @@ export async function saveReply(type, getMessage, fromStreaming, title, swipes,
61186122 }
61196123
61206124 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;
61216129 const swipeInfo = {
61226130 send_date: item.send_date,
61236131 gen_started: item.gen_started,
61246132 gen_finished: item.gen_finished,
61256133 extra: structuredClone(item.extra)swipeInfoExtra,
61266134 };
61276135 const swipeInfoArray = [];
61286136 swipeInfoArray.length = swipes.length;