feat(assistant): add the in-page AI assistant to docs.celo.org (#2250) - #2286
Open
GigaHierz wants to merge 3 commits into
Open
feat(assistant): add the in-page AI assistant to docs.celo.org (#2250)#2286GigaHierz wants to merge 3 commits into
GigaHierz wants to merge 3 commits into
Conversation
Trivial marker script to confirm Mintlify's content-directory JS injection works on the current plan before building the real widget loader. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces the injection-test marker with the real loader. The widget is served from the assistant deployment and answers from the docs MCP endpoint with links back to the pages it used. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds the Ask AI button to the entry-point table and a short section covering what it answers from, that it cites its sources, and that uncited gaps feed back into what gets written. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the implementation half of #2250. The research, comparison table and decision are recorded on the issue.
What this adds
assistant.js— a loader that injects the assistant widget on every page. Mintlify includes every.jsfile in the content directory site-wide but doesn't support a raw<script src>in MDX, so the tag is created programmatically.use-docs-with-ai.mdx— documents the Ask AI button alongside the existing MCP / llms.txt entry points.The widget and its API live in
celo-org/docs-ai-assistant, deliberately outside this repo — any.jscommitted here is injected into the live site.How it works
There is no second content pipeline. The backend answers using the Mintlify-hosted MCP endpoint at
docs.celo.org/mcp, which is reindexed on every docs deploy, so the assistant can never serve a stale index. Citations come free because the MCP search tool returns page URLs.Models are Haiku 4.5 by default with a Sonnet 5 escalation when an answer cites nothing.
Verified against the live deployment
200submit_feedbackMCP toolBefore merging
The assistant currently runs on a temporary, rate-limited OpenRouter key for testing. Merging puts the widget on every docs page, so the sequence should be:
WIDGET_SRCatdocs-assistant.celo.orgonce IT creates the CNAME (currently the Vercel URL — a one-line change).Merging also confirms the last open question: whether content-directory JS injection works on our Mintlify plan. The pricing table and the already-injected
style.cssboth say yes, but preview deployments are Pro-gated, so production is the only conclusive test. Open any page's console and look for the widget.🤖 Generated with Claude Code