Closed g-francesca closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
orama-ui-components-storybook | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 24, 2024 9:43pm |
Currently, we only allow aborting the answer when the message is loading, not when it's updating. Therefore, if the answer is too long, we can't stop it
Replace hardcoded sources with the real ones
* Quick actions must be displayed only on message complete β * Add aria-label to buttons to make them accessible β * implement regenerate logic and make sure to handle error if regenerate β * Regenerate should be visible only for the last item β
Here are the key points covered in the PR:
regenerateLast
function provided by the orama client. We are currently not getting answers as an array of strings, so we always show the last regenerated answer.path
is not absolute, so we may want to pass abaseUrl
to make the link work.resultsMapping
) to display the correct fields.I also did some refactoring to the
chatContext
state, so it now only includes:I removed
messages
in favor ofinteractions
, and the status is now handled as a single interaction status (not a global one). This way, updating the UI according to the answer status (which. is what we mostly do) becomes simpler. The type of a single interaction is:Which is closer to the status we get from the server. These types should be imported by the client for consistency though