ShipBit/slickgpt

Mid-message scripts (enclosed by three backticks) break formatting

Arro opened this issue · 4 comments

Arro commented

Screenshot 2023-04-15 at 4 34 22 PM

See screenshot. I wonder if there's a way to close any open backticks temporarily while streaming in the response.

Hi @Arro, I tried to implement a solution based on a derived store which is basically a "pipe" that auto-completes opened but unclosed code tags. It's not always perfect but seems to be much better while streaming the results and also when cancelling a completion inside of an opened code block. Would you mind testing it on the playground in the attached PR and giving some feedback? Does that solution solve your typical use-cases?

Arro commented

Definitely!

Arro commented

Tested, and it works so much better.

There's a separate issue of not being able to copy and paste while the message is in flight to you, but let's leave that for another time.

Cool, thanks! I merged this and will take a look at the other one in the next days.