You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Render inline code and code blocks in user messages #12791
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Proposed Feature:
Currently, OpenCode does not render Markdown for inline code (wrapped in single backticks `) or code blocks (wrapped in triple backticks ```) within messages sent by the user. The input is displayed as raw text.
I propose that user messages be parsed and rendered to support:
Inline code styling for text between single backticks.
Properly formatted code blocks for text between triple backticks, ideally with syntax highlighting.
Use Case:
When discussing code, users frequently paste snippets or refer to specific variables, functions, or file paths.
Readability: Rendering variable_names or code blocks makes it much easier to distinguish code from natural language in the chat history.
Consistency: It aligns the user's message appearance with the AI's responses, which typically render Markdown, creating a more cohesive chat interface.
Reacted by Ted Robertson, Sachith Shetty, Salvatore Antonio Addimando and Rob Simpkins
I remember they implemented this in an update, but probably reverted it and I didn't even notice in that moment. But I swear it might have been developed and thrown away already.
Does anyone remember of this feature?
Hi, I'd like to work on this if it's still available. I've looked at the codebase and have a clear implementation plan — modifying HighlightedText in message-part.tsx to parse backtick syntax before rendering. Is anyone currently working on it?
Activity
github-actions commentedon Feb 9, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
expl0r3rgu1 commentedon Apr 2, 2026
I remember they implemented this in an update, but probably reverted it and I didn't even notice in that moment. But I swear it might have been developed and thrown away already.
Does anyone remember of this feature?
sandikodev commentedon Apr 3, 2026
Hi, I'd like to work on this if it's still available. I've looked at the codebase and have a clear implementation plan — modifying HighlightedText in message-part.tsx to parse backtick syntax before rendering. Is anyone currently working on it?
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.