Open-Assistant
Open-Assistant copied to clipboard
display the latest N messages on the website
The backend now provides a /api/v1/messages/ endpoint that returns by default the 10 latest messages stored. We should present these somewhere on the home page when a user is logged in.
To finish this we need:
- [ ] A new API route that fetches messages
- [ ] A new component that use
useSWRImmutableto fetch some messages and then presents them in a decent format, probably a table.
When presenting the messages, we should present the text and is_assistant fields. The client side should retain the id and parent_id for later features.
Related #159 ?
I think we can treat them separately. This is more structured as a news feed of messages that have been submitted globally. I expect the messages in this feed would be unrelated to each other.
Visually they could share the same components but I think it's also sensible for them to have distinct styles since their purposes diverge.
I would like to try this!
It's yours!
I will close this, it seems to be fixed in #375