assistant2: Uniquely identify remove buttons on ContextPills (#22115)

This PR ensures that the remove buttons on the `ContextPill`s are
uniquely identified.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-12-16 17:57:05 -05:00 committed by GitHub
parent eb74332e96
commit 373854be46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,7 +39,7 @@ impl RenderOnce for ContextPill {
.child(Label::new(self.context.name.clone()).size(LabelSize::Small))
.when_some(self.on_remove, |parent, on_remove| {
parent.child(
IconButton::new("remove", IconName::Close)
IconButton::new(("remove", self.context.id.0), IconName::Close)
.shape(IconButtonShape::Square)
.icon_size(IconSize::XSmall)
.on_click({