feat: Markdown rendering for user messages
I'm using Markdown a lot and I'm a little bit sad that OpenCode doesn't render my Markdown-typed messages as Markdown. I have tried to fix it in this PR.
There is one caveat - the highlighting for files and agents is omitted because it breaks the Markdown. Personally I would prefer to have my messages rendered as Markdown than have the references to files and agents highlighted. The feature is disable by default so it doesn't not impact the current user experience in any way.
@thdxr @jayair @rekram1-node Please can you review this PR?
I think this is mostly up to Adam, tui features are his domain
main issue with this is that the markdown rendering swallows html tags and other random stuff people add to their prompts (__init__.py), we originally did this and got a bunch of complaints. can revisit with opentui.
any chance this gets another look?
this pr would prolly need a refresher and then we can look at it.
The solution in this PR is not very good. I think it would be better to address it somehow in the OpenTUI as suggested above.