Skip to content

feat(web): add markdown rendering and copy button to assistant explanations - #234

Merged
ktjn merged 4 commits into
mainfrom
feat/chat-markdown-and-copy
Jul 27, 2026
Merged

feat(web): add markdown rendering and copy button to assistant explanations#234
ktjn merged 4 commits into
mainfrom
feat/chat-markdown-and-copy

Conversation

@cjot

@cjot cjot commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Adds markdown rendering and a copy button to assistant explanation messages, plus a larger chat input textarea.

Changes

Prompt (cli/src/modelable/browser/ai.py):

  • Updated _EXPLAIN_SYSTEM to request markdown formatting (headers, bullet lists, inline code, bold) instead of plain English

Markdown rendering (web/src/):

  • Added react-markdown + remark-gfm dependencies
  • New MarkdownText.tsx component wrapping react-markdown with GFM support
  • Explanation messages now render via <MarkdownText> instead of raw text

Copy button (web/src/ai/ChatPanel.tsx):

  • Added a "Copy" chip on explanation messages that copies the explanation to clipboard with a brief "Copied" confirmation

Textarea sizing (web/src/ai/ChatPanel.tsx + web/src/style.css):

  • Increased from rows={3} / min-height: 3.5rem to rows={4} / min-height: 5rem

CSS (web/src/style.css):

  • Added styles for rendered markdown elements (headings, lists, code blocks, blockquotes, tables, inline code) scoped under .chat-markdown

ktjn and others added 3 commits July 27, 2026 08:16
…ations

- Update _EXPLAIN_SYSTEM prompt to request markdown formatting
- Add react-markdown + remark-gfm for rendering explanation text
- Create MarkdownText wrapper component
- Render assistant explanation messages as markdown instead of plain text
- Add copy-to-clipboard button on explanation messages
- Increase chat composer textarea from rows=3 to rows=4
- Add CSS for rendered markdown elements (headings, lists, code blocks,
  blockquotes, tables) and style the copy button
@cjot
cjot requested a review from ktjn July 27, 2026 06:37
@ktjn
ktjn merged commit 6535650 into main Jul 27, 2026
8 of 9 checks passed
@ktjn
ktjn deleted the feat/chat-markdown-and-copy branch July 27, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants