llm icon indicating copy to clipboard operation
llm copied to clipboard

rich printing

Open juftin opened this issue 2 years ago • 9 comments

This PR adds Rich as a dependency and includes the option to print with Markdown formatting with the --rich flag.

image

Resolves: #12

Let me know if you're still interested in this and I'm happy to adapt it if you'd like

juftin avatar Sep 14 '23 03:09 juftin

I just tried this and it is so nice to see! I coupled it with #293 to add readline and together they make chat a real pleasure to use

NathanWilliams avatar Oct 28 '23 02:10 NathanWilliams

I see it's done with the .live() option, with streaming. Very nice. Previously it was possible to pipe the output to Rich to get Markdown rendering, but then streaming is lost. Live Markdown is a readability boost especially for chat mode.

vividfog avatar Oct 28 '23 08:10 vividfog

any chance this functionality could move forward? Whether from this PR or another like it. imo it'd be a boon to the UX of this tool! @simonw

bloomsa avatar Mar 27 '24 20:03 bloomsa

I would love this too! mods supports this, and it looks really cool! 😍

jimmybutton avatar Apr 11 '24 13:04 jimmybutton

Looks awesome, would love to see this implemented!

thiswillbeyourgithub avatar Jul 01 '24 08:07 thiswillbeyourgithub

I've been wanting to implement this myself for weeks. I use llm daily and the lack of rich formatting is the only issue I have with it. I recently discovered rich and found it delightful and robust, so was planning on adding this to llm myself, but discoverd this PR. Are we just waiting on @simonw to review or is there work to be done? I'm happy to help :)

gianlucatruda avatar Sep 12 '24 15:09 gianlucatruda

UPDATE: I rebased, fixed some weird edge cases that were causing tests to fail, and resolved merged conflicts. I've opened #571 with the improvements, as this PR seems to have gone quiet 😢

gianlucatruda avatar Sep 12 '24 19:09 gianlucatruda