Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

display the latest N messages on the website

Open fozziethebeat opened this issue 2 years ago • 4 comments
trafficstars

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 useSWRImmutable to 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.

fozziethebeat avatar Jan 03 '23 06:01 fozziethebeat

Related #159 ?

AbdBarho avatar Jan 03 '23 12:01 AbdBarho

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.

fozziethebeat avatar Jan 04 '23 03:01 fozziethebeat

I would like to try this!

jojopirker avatar Jan 04 '23 10:01 jojopirker

It's yours!

fozziethebeat avatar Jan 04 '23 10:01 fozziethebeat

I will close this, it seems to be fixed in #375

AbdBarho avatar Jan 08 '23 10:01 AbdBarho