Once #62 is done, we should revisit the determination of ClientMessage's content_type.
|
content_type = "html" if isinstance(content, HTML) else "markdown" |
And, in fact, that determination should probably be made by ChatMessage.
Note also that after #119, ChatMessage now essentially checks whether content_type is "html" and, if so, wraps it in a "literal HTML" wrapper. I think we could, instead, set content_type="html" (to avoid going through the markdown parser) and remove the need for the "literal HTML" wrapper?
Once #62 is done, we should revisit the determination of
ClientMessage'scontent_type.shinychat/pkg-py/src/shinychat/_chat.py
Line 988 in 82f43c6
And, in fact, that determination should probably be made by
ChatMessage.Note also that after #119,
ChatMessagenow essentially checks whethercontent_typeis"html"and, if so, wraps it in a "literal HTML" wrapper. I think we could, instead, setcontent_type="html"(to avoid going through the markdown parser) and remove the need for the "literal HTML" wrapper?