From a63ddb36d20c38393f1f7c500f4aee630c409ed0 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Sat, 19 Sep 2026 16:42:15 -0400 Subject: [PATCH] fix: clear a reply's score and reason when its rating switches thumbs (#30075) --- .../chat/Messages/ResponseMessage.svelte | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index ac0def17f9..695e7e7b56 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -464,6 +464,9 @@ annotation: { ...(message?.annotation ?? {}), ...(rating !== null ? { rating: rating } : {}), + ...(rating !== null && rating !== message?.annotation?.rating + ? { reason: null, details: null } + : {}), ...(details ? details : {}) } }; @@ -1610,15 +1613,17 @@ {#if message.done && showRateComment} - { - await feedbackHandler(null, { - ...e.detail - }); - }} - /> + {#key message?.annotation?.rating} + { + await feedbackHandler(null, { + ...e.detail + }); + }} + /> + {/key} {/if} {#if (isLastMessage || ($settings?.keepFollowUpPrompts ?? false)) && message.done && !readOnly && (message?.followUps ?? []).length > 0}