assistant2: Derive the Context icon at render time instead of storing (#22397)

This PR is a follow up to #22385 that makes it so we treat the icon as
derived state.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-12-24 11:13:35 -05:00 committed by GitHub
parent 564936e1fe
commit 4c84600630
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 22 deletions

View file

@ -36,9 +36,8 @@ impl ContextStore {
self.context.push(Context {
id: self.next_context_id.post_inc(),
name: name.into(),
kind: kind.clone(),
kind,
text: text.into(),
icon: kind.icon(),
});
}