agent: Add reactions at the response level (#27958)

Release Notes:

- Added the user reaction (👍 or 👎) to each agent response.
- 👎 will trigger a comment box linked to the response

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Agus Zubiaga <hi@aguz.me>
This commit is contained in:
Thomas Mickley-Doyle 2025-04-09 12:21:07 -05:00 committed by GitHub
parent b47aa33459
commit 342134fbab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 173 additions and 68 deletions

View file

@ -498,10 +498,12 @@ impl RateCompletionModal {
cx
))
.on_click(cx.listener(move |this, _, window, cx| {
this.thumbs_down_active(
&ThumbsDownActiveCompletion,
window, cx,
);
if this.active_completion.is_some() {
this.thumbs_down_active(
&ThumbsDownActiveCompletion,
window, cx,
);
}
})),
)
.child(
@ -517,7 +519,9 @@ impl RateCompletionModal {
cx
))
.on_click(cx.listener(move |this, _, window, cx| {
this.thumbs_up_active(&ThumbsUpActiveCompletion, window, cx);
if this.active_completion.is_some() {
this.thumbs_up_active(&ThumbsUpActiveCompletion, window, cx);
}
})),
),
),