Architecture: Should we use external dependencies (marked, highlight.js) f...

Documentation for Sessions

🏗️ Architecture: Should we use external dependencies (marked, highlight.js) f...

Date: 2026-02-21
Time: 18:20:00 UTC
Session: gspace1-133.2
Agent: angular
Confidence: NaN%
Status: ✅ Documented


📋 Decision Context

Question:

Should we use external dependencies (marked, highlight.js) for markdown rendering and syntax highlighting in the unified chat?

Task: Not specified


🎯 Decision Made

Chosen:

Build custom NX libraries @libs-ux/ux-markdown and @libs-ux/ux-code-highlight

Options Considered:

  1. Use marked + highlight.js (external)
  2. Build custom NX libraries @libs-ux/ux-markdown and @libs-ux/ux-code-highlight

💭 Reasoning

Platform philosophy mandates zero external runtime dependencies for UX features. Custom libraries ensure quality control, consistent theming via --ux-* CSS variables, and alignment with existing library patterns (ux-icons, ux-portal, ux-menu). Markdown parsing is well-scoped (~500 lines for chat-grade markdown). Syntax highlighting can use CSS class injection with a compact language grammar system.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation