From 2d5651410122c4c381eaded78defccdd29cfd975 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Tue, 13 Oct 2026 08:47:05 -0400 Subject: [PATCH] fix: a rating's reason and comment are no longer wiped when its tags arrive (#32334) --- .../components/chat/Messages/ResponseMessage.svelte | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 653bb0ae9d..5a17221ecd 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -569,13 +569,16 @@ console.log(tags); if (tags) { - updatedMessage.annotation.tags = tags; - feedbackItem.data.tags = tags; + const taggedMessage = { + ...message, + annotation: { ...(message?.annotation ?? {}), tags: tags } + }; + feedbackItem.data = { ...feedbackItem.data, ...taggedMessage.annotation }; - saveMessage(message.id, updatedMessage); + saveMessage(message.id, taggedMessage); await updateFeedbackById( localStorage.token, - updatedMessage.feedbackId, + taggedMessage.feedbackId, feedbackItem ).catch((error) => { toast.error(`${error}`);