posit-dev / py-shiny

Shiny for Python
https://shiny.posit.co/py/
MIT License
1.32k stars 81 forks source link

Add `ui.MarkdownStream` #1782

Open cpsievert opened 17 hours ago

cpsievert commented 17 hours ago

This PR extracts the streaming markdown capabilities of ui.Chat() into another component: ui.MarkdownStream(). See the new files for example usage:

By pulling out the markdown rendering aspect of chat.ts into a more reusable web component, it not only allows us to fairly easily support an additional component, but I can also re-use it for chatlas, which will be a big improvement over the rich console for a web-based settings.

TODO