ATRIUMsearch → argument graph
Article · 2026-07-07 · 4 moments

github-code Web Component

Tool: github-code Web Component An experimental Web Component built using GPT-5.5 and the following prompt: let's build a Web Component for embedding code from GitHub <github-code href="https://github.com/simonw/sqlite-ast/blob/437c759129154f05296324a7f82aa1246340dd14/sqlite_ast/parser.py#L9-L18"></github-code> It takes URLs like that, converts them to https://raw.githubusercontent.com/simonw/sqlite-ast/437c759129154f05296324a7f82aa1246340dd14/sqlite_ast/parser.py, then uses fetch() ✦ AI generated

01
Mechanism

The component takes a GitHub blob URL with a line range (e.g. .../blob/<sha>/<path>#L9-L18) and converts it into a raw.githubusercontent.com URL to fetch the file contents.

Explains the URL-rewriting mechanism: GitHub blob URLs are transformed into raw content URLs for fetching.

transcript

Simon Willison: It takes URLs like that, converts them to https://raw.githubusercontent.com/simonw/sqlite-ast/437c759129154f05296324a7f82aa1246340dd14/sqlite_ast/parser.py, then uses fetch() to fetch them and displays the specified range of lines

Highlight slides
Related episodes