posit-dev / posit-dev/shinychat
[python]: Revisit `content_type` determination
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 139
- Forks
- 28
- Avg merge
- 23h 44m
- Merged PRs (30d)
- 50
Description
Once https://github.com/posit-dev/shinychat/pull/62 is done, we should revisit the determination of ClientMessage's content_type.
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?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pkg-py/src/shinychat/_chat.py around line 988, then review PR #62 and the changes from issue #119. Trace how ClientMessage and ChatMessage determine content_type and how the literal HTML wrapper interacts with markdown parsing; done means the ownership and resulting behavior are clearly resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100