Issue with rendering back from history code blocks
mstfash opened this issue · 9 comments
Anything regarding that ?
Hi @mstfash — Thanks for reporting this.
I have noticed the issue as well, while re-writing the React
layer of NLUX.
I will fix it as part of the v2 release — expect it in a few days, mid next week.
Is it also possible to remove the typing effect when rendering the conversation history? I'd like to save that for content that is streamed back live.
@jlev — This is in the lastest
branch, right ? Or maybe in v2.0.0-alpha.1
?
I don't think it has been published as a stable version yet.
But yes, you're right: It should not be there.
- Initial commit here to fix the issue.
- Initial fix can be tested in in
2.0.2-alpha
- This is not stable and not recommended for prod yet. It should be ready to use once the stable v2.x is released.
Progress:
- Parse markdown for messages loaded via conversation history as a snapshot (vs stream)
- We do not display animation anymore
- Make snapshot markdown 100% identical to streamed markdown
- Handle advanced syntax highlighter use cases (copy button options, etc)
Thanks for your support @salmenus
I have tried version 2.0.6-alpha
there are a lot of changes regarding css and how AIChat used to work so I had to change a lot of my custom css to its like before anyways I have got this done, but the real issue here that popped up that Events are not doing anything, usually Events map for messageSent and messageReceived I usually get a callback with the message, suddenly both of them are not working.
Could you please look into this ?
Thanks again!
Hey @salmenus
Thank you for your fast responses and continuous support.
After installing version 2.0.9-alpha
and Events layer work fine so I can save messages of user and ai just fine but. when using useLocalStorage with initialConversation it renders double messages for user and ai, they disappear though when reloading the page which is understandable. but this is not a good behavior
Thanks in advance
Issues here fixed in latest v2 and later:
- Now we use the same markdown parser for both streaming and history, so markdown should be consistent
- Typing effect remove from history
- The double rendering issue should be fixed in latest v2
I'll be closing this issue unless
@mstfash @jlev if you still have issues related to history reloading, please raise a separate issue and make sure you provide a reproducible example (via CodeSandbox or similar)