[FEATURE]: Render inline code and code blocks in user messages #8888

Open
opened 2026-02-16 18:11:06 -05:00 by yindo · 1 comment
Owner

Originally created by @bannert1337 on GitHub (Feb 9, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Feature hasn't been suggested before.

  • 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.
Originally created by @bannert1337 on GitHub (Feb 9, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Feature hasn't been suggested before. - [x] 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.
yindo added the discussionweb labels 2026-02-16 18:11:06 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 9, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #12781: [FEATURE]: Beautified Question Tool Text Display (similar request for rendering markdown formatting in assistant/tool questions)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Feb 9, 2026): This issue might be a duplicate of existing issues. Please check: - #12781: [FEATURE]: Beautified Question Tool Text Display (similar request for rendering markdown formatting in assistant/tool questions) Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8888