deep-chat
deep-chat copied to clipboard
BUG: Line breaks are not maintained in chat
When I type a message into that input that looks like...
This is my first line in my first paragraph....and then i start a list:
- An item
- An item
- An item
Then a new paragraph
Line breaks are removed when shown in the message area:
This is my first line in my first paragraph....and then i start a list:- An item- An item- An itemThen a new paragraph
Hi @tasdflkjweio, I will investigate this bug shortly and report to you on the progress.
Hi @tasdflkjweio. This issue has now been fixed in deep-chat-dev and deep-chat-react-dev package versions 9.0.163.
Please note that the user message is parsed by the Remarkable library (just like the ai response messages), so the line (-) syntax will be re-formated to be a bullet point, would this be problematic?
Let me know, thanks!
had a chaotic couple days at work so just checking this out now.
so the line (-) syntax will be re-formated to be a bullet point, would this be problematic? thanks for asking, it should be fine.
i'll test it out today and let you know soon
Alright, tested and it's a little better but a bit off still.
Example 1:
line 1
line 2
line 3
line 4
- bullet 1
- bullet 2
line 5
is formatted as:
Example 2:
line 1
line 2
line 3
line 4
- bullet 1
- bullet 2
line 5
line 6
line 7
is formatted as:
Ah i see - it seems Remarkable is expecting CommonMark format. Hrm
The breaks flag seems to improve this some. Line 5 is off, but everything else seems good:
The second example seems better:
That's presumably what you've enabled tho?
Hi @tasdflkjweio.
Deep Chat uses the Remarkable library's defaults to format text. This way the user will not experience any unexpected behaviour.
To note, if the parent application imports the highlight.js module as an external dependency, we specifically set the configuration to help with coding syntax.
The code can be found here.
@OvidijusParsiunas When can we expect the next update to the non-dev package? Would love to see this in deep-chat-react (as well as other fixes/improvements I've seen made to the dev package in recent months)!
Hi @jbrachtie I share your frustration and want to get the big new update out of the way ASAP! I have set myself with a deadline of 11th of July, so if nothing else jumps up in the interim - expect a big update very soon!
@OvidijusParsiunas oh wow! Great to know, and certainly understand the effort to get such a big update out. I know a lot has gone into dev since the last release. Thanks for the quick reply and very excited about the next big update :)
Hi folks.
It appears that my previous solution causes strange space issues when rendering code. I have changed the Remarkable configuration to now always use the breaks option mentioned by by @tasdflkjweio.
The fix is available in deep-chat-dev and deep-chat-react-dev versions 9.0.185, let me know if this causes issues for anyone. Thanyou!
Hi, everything mentioned in this issue has now been released in Deep Chat version 2.0.0.