Open-Assistant
Open-Assistant copied to clipboard
Web Cleanup: Ensure `FlaggableElement` always has a list of valid labels
FlaggableElement now wraps any message. These messages get used throughout the frontend in both tasks and when displaying messages or conversations.
To make things work I've piped an array of valid labels where possible for all task types and an empty array for the message views.
A more scalable approach would be fore FlaggableElement to automatically fetch the valid labels itself (and thus simplify all places that use FlaggableElement) but using smart caching so that the call only happens the first time FlaggableElement is used somewhere in the app.
I have something working to my satisfaction. Will cleanup and prepare PR