## ADDED Requirements ### Requirement: Markdown rendering for assistant messages The system SHALL convert assistant message content from markdown to formatted HTML using Markdig, displaying headings, bold, italic, code blocks, lists, tables, links, and blockquotes with proper visual formatting. #### Scenario: Markdown bold and italic rendered - **WHEN** an assistant message contains `**bold**` or `*italic*` text - **THEN** the text is displayed with bold or italic formatting respectively #### Scenario: Code block rendered - **WHEN** an assistant message contains a fenced code block (triple backticks) - **THEN** the code is displayed in a monospace font within a visually distinct block #### Scenario: Inline code rendered - **WHEN** an assistant message contains inline code (single backticks) - **THEN** the code is displayed in a monospace font with a subtle background #### Scenario: List rendered - **WHEN** an assistant message contains a markdown list (ordered or unordered) - **THEN** the list is displayed with proper indentation and bullet/number markers #### Scenario: Heading rendered - **WHEN** an assistant message contains markdown headings (# through ######) - **THEN** the headings are displayed with appropriate size and weight #### Scenario: Link rendered - **WHEN** an assistant message contains a markdown link `[text](url)` - **THEN** the link is displayed as a clickable hyperlink opening in a new tab #### Scenario: Table rendered - **WHEN** an assistant message contains a markdown table - **THEN** the table is displayed with borders, header row styling, and proper alignment ### Requirement: HTML sanitization The system SHALL sanitize all HTML output from the markdown renderer to prevent cross-site scripting (XSS) attacks from LLM-generated content. #### Scenario: Script tags stripped - **WHEN** assistant message content contains `