Reverse-engineering Claude's generative UI - then building it for the terminal (27 minute read)
TLDR AI
•
Generative AI
Claude's generative UI is a tool call that returns HTML injected into the DOM with incremental parsing as tokens stream. It enables interactive widgets to be rendered inline in Claude conversations. It uses lazy-loading documentation to insert context on demand. The terminal spawns Glimpse windows with bidirectional JSON communication, allowing the terminal to stay as a terminal while the visual content gets a real browser engine.