meltylabs / melty

Chat first code editor. To download the packaged app:
https://docs.google.com/forms/d/e/1FAIpQLSc6uBe0ea26q7Iq0Co_q5fjW2nypUl8G_Is5M_6t8n7wZHuPA/viewform
MIT License
5.17k stars 346 forks source link

Fix rerender joules #80

Closed jacksondc closed 2 months ago

jacksondc commented 2 months ago

Fixes bug where Joules are re-rendered even when they don't change.

FYI @abhi12299 I took a different approach here that should be a bit more robust to different kinds of edits to the conversation. Let me know what you think and thanks for pointing this out!

abhi12299 commented 2 months ago

Does the jouleState being partial mean that the text is being streamed for the joule? If so, what happens if the streaming fails and joule gets stuck in a partial state? I guess it will continue to re-render as the conversation continues

jacksondc commented 2 months ago

Yes, isPartial = Claude hasn't stopped streaming. I think we're preventing adding joules on top of partial joules, but yeah, we should keep that in mind going forward as a potential issue.