deep-chat
deep-chat copied to clipboard
loadHistory strange behavior with last message.
I've been experimenting extensively with the library and came across a strange issue while loading old conversation messages using loadHistory. I’ve also prepared a reproducer, which I’ll link below.
Issue Description
When messages are loaded via loadHistory, the attributes of the last message (e.g., text, html) get removed. A current workaround is to append an empty message at the end, but this introduces another issue when the last message in history is deep-chat-temporary-message. I’ve tested this on both stable and dev versions and encountered the same issue.
Screenshot
Issue Reproducer https://stackblitz.com/edit/vitejs-vite-v6y15soc?file=src%2Fmain.js
Hi @lekhnath. Thankyou for letting me know about the issue. I was able to reproduce it and will do my best to fix it tomorrow. Thanks!
Hi @lekhnath.
I was able to identify the problem. Due to my limited time today I was able to add a temporary fix which is available in deep-chat-dev and deep-chat-react-dev versions 9.0.246.
This should hopefully work to fix your problem, but there might be some other areas that still need to be ironed out. I will look to explore it a little further tomorrow.
If you have any more issues let me know.
Thankyou!
@OvidijusParsiunas Thanks. I'll check on my end and let you know if I found anything amiss.
@OvidijusParsiunas
html content is now shown in the chat bubble, but the onMessage event still does not contain the html attribute of the last message.
Yet another issue. Now, the HTML content does not show up from the server response after the user submits a message. It has broken some other things. Please take your time to apply the fixes. No rush. 😊
The HTML does not display when set directly from the history property either.
Hi @lekhnath.
Thankyou for letting me know about those issues.
These should all be fixed in deep-chat-dev and deep-chat-react-dev version 9.0.247.
If you experience any other issues please let me know.
Yet another issue. Now, the HTML content does not show up from the server response after the user submits a message. It has broken some other things. Please take your time to apply the fixes. No rush. 😊
I was not able to reproduce this issue. Could you provide me with more information on how to reproduce it? Thankyou!
The fixes mentioned in the issues are now available in deep-chat and deep-chat-react version 2.2.0.