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

clearMessages() cannot delete messages added by signals.onResponse

Open fanxing-6 opened this issue 1 year ago • 1 comments

chatElementRef.addMessage({ html: htmlContent, role: 'assistant'}) chatElementRef.addMessage({ html: htmlContent, role: 'assistant'}) chatElementRef.addMessage({ html: htmlContent, role: 'assistant'}) signals.onResponse({ text: finalAnswer, role:'assistant' }); To achieve returning multiple messages, I used the above method, but when executing clearMessages(), it cannot clear the message added by signals.onResponse. Is there a better method?

fanxing-6 avatar Sep 18 '24 06:09 fanxing-6

Hey @fanxing-6. I have attempted to reproduce this error, but clearMessages seems to work correctly for me.

I recommend you to try our latest deep-chat-dev and deep-chat-react-dev packages version 9.0.192 to see if they can resolve your issue.

If you are still experiencing your problem, can you please give me more example code so I can try to reproduce it. Or even a live CodeSandbox example.

Thankyou!

OvidijusParsiunas avatar Sep 28 '24 07:09 OvidijusParsiunas

Closing since there has been no response.

OvidijusParsiunas avatar Jan 08 '25 12:01 OvidijusParsiunas