ContextLens
An AI assistant for any web page
A Chrome extension: select text on any site and a floating panel lets you explain, summarize or rewrite it with OpenAI or Anthropic models, with the answer streaming in token by token — no copy-pasting into a separate chat window.
- Wrote an incremental Server-Sent Events parser that handles events split across network chunks; closing the panel aborts the in-flight request.
- Rendered the panel in a closed Shadow DOM so page CSS and scripts can't touch it, and model output as text, never HTML.
- Kept the API key in
chrome.storage.local, used only by the service worker, with host permissions limited to the two model APIs. - 26 unit tests and a GitHub Actions pipeline (type-check, test, build) on every push; zero runtime dependencies.