defmodule Annotai do @moduledoc """ Dev-only Plug. Mount it in your endpoint, guarded so it never reaches prod: if Mix.env() == :dev do plug Annotai end For requests under `/annotai/*` it serves the widget asset, the annotation API, and the MCP endpoint (via `Annotai.Router`). For every other HTML response it injects a single `) end defp html?(conn) do case get_resp_header(conn, "content-type") do [ct | _] -> String.contains?(ct, "text/html") _ -> false end end end