Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions assistant.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Loads the docs AI assistant widget on every page (celo-org/docs#2250).
//
// Mintlify includes every .js file in the content directory on all pages, but
// does not support a raw <script src> tag in MDX, so the widget is injected
// programmatically. The widget itself and the API it calls are served from the
// assistant deployment; it derives its own API origin from this src.
(function () {
var WIDGET_SRC = 'https://docs-assistant.celo.org/widget.js';

var script = document.createElement('script');
script.src = WIDGET_SRC;
script.async = true;
document.head.appendChild(script);
})();
11 changes: 11 additions & 0 deletions build-on-celo/build-with-ai/use-docs-with-ai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This matters because model training data goes stale. Celo became an Ethereum L2

| Entry point | URL | Best for |
|-------------|-----|----------|
| In-page assistant | **Ask AI** button on any page | Quick questions while reading, without leaving the docs |
| MCP server | `https://docs.celo.org/mcp` | Editors and agents — live search, no copy-paste |
| Docs index | [`/llms.txt`](https://docs.celo.org/llms.txt) | Giving a chat a map of every docs page |
| Full corpus | [`/llms-full.txt`](https://docs.celo.org/llms-full.txt) | Long-context models that can hold the whole docs set |
Expand Down Expand Up @@ -196,6 +197,16 @@ Reach for `llms.txt` by default. It costs a fraction of the tokens, and any tool

Both files are generated from the live site, so they never go stale.

## Ask a question in the docs

Every page has an **Ask AI** button in the bottom-right corner. It answers from the documentation and links the pages it used, so you can check the source rather than take the answer on trust.

It searches the same content as the MCP server above, which means answers reflect the docs as currently published — not a model's training data.

<Note>
Answers are AI-generated. Follow the citations before relying on anything load-bearing, especially contract addresses and code. If the docs don't cover your question, the assistant says so instead of guessing — and that gap is a signal we use to decide what to write next.
</Note>

## Copy any page as Markdown

Every page has a contextual menu beside its title:
Expand Down
Loading