deep-chat icon indicating copy to clipboard operation
deep-chat copied to clipboard

loadHistory strange behavior with last message.

Open lekhnath opened this issue 8 months ago • 8 comments

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

Image

Issue Reproducer https://stackblitz.com/edit/vitejs-vite-v6y15soc?file=src%2Fmain.js

lekhnath avatar Mar 21 '25 04:03 lekhnath

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!

OvidijusParsiunas avatar Mar 21 '25 18:03 OvidijusParsiunas

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 avatar Mar 22 '25 05:03 OvidijusParsiunas

@OvidijusParsiunas Thanks. I'll check on my end and let you know if I found anything amiss.

lekhnath avatar Mar 22 '25 07:03 lekhnath

@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.

lekhnath avatar Mar 22 '25 07:03 lekhnath

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. 😊

lekhnath avatar Mar 22 '25 10:03 lekhnath

The HTML does not display when set directly from the history property either.

lekhnath avatar Mar 22 '25 10:03 lekhnath

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.

OvidijusParsiunas avatar Mar 24 '25 10:03 OvidijusParsiunas

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!

OvidijusParsiunas avatar Mar 24 '25 10:03 OvidijusParsiunas

The fixes mentioned in the issues are now available in deep-chat and deep-chat-react version 2.2.0.

OvidijusParsiunas avatar May 08 '25 13:05 OvidijusParsiunas