Step-by-step coding mentor for LeetCode-like problems.
Graduated hints (H1 → H2 → H3 → Plan → Pseudocode), no spoilers by default. BYOK (Bring Your Own) Gemini key.
- On-page mentor widget (draggable; position persists).
- Hint ladder: H1 (nudge) → H2 (concept) → H3 (approach) → Plan → Pseudocode.
- AI integration (BYOK): calls Gemini from the background; the key never touches content scripts or the page.
- Monaco code capture: reliably reads the editor’s real buffer for context (not just visible lines).
- Clean error messages for common cases (invalid key, rate limit, model busy).
- A content script injects the widget on
leetcode.com/leetcode.cn. - You pick a hint level and (optionally) type what you’re stuck on.
- Content → Background: sends problem title/URL/difficulty, your question, and editor code.
- Background builds a prompt and calls Gemini → returns a small next-step hint.
- Download or clone this repo.
- Open Chrome → visit
chrome://extensions. - Toggle Developer mode (top-right).
- Click Load unpacked → select the project folder.
- Click the extension’s Options page → paste your Gemini API key → Save.
BYOK = Bring Your Own Key. Each user creates their own key and pastes it.
The key is saved only in your browser profile viachrome.storage.local.
- Create a Web API key in Google AI Studio.
- Copy the key (looks like
AIza…) and paste it in the extension Options page. - Free tier has quotas; see troubleshooting below.
Drag the widget by its header; position is saved.
Hint example (H1/H2/H3):
Pseudocode example:
- H1/H2/H3/Plan/Pseudocode on a few problems.
- Empty editor vs. with your code (the model can comment on your actual code).
leetcode.comandleetcode.cn.- Error handling paths: 401 (bad key), 429 (free-tier rate limit), 503 (model busy).
- “API key invalid” (401/403): Open Options and re-paste a valid Gemini key.
- “Free-tier rate limit hit” (429): Wait a bit and try again.
- “Model is busy” (503): Wait ~20–60s and click again (busiest times cause this).
- No widget? Ensure the page matches
leetcode.com/*orleetcode.cn/*. Reload the extension and the page.
- Your Gemini key is not hard-coded in the repo; it’s stored locally via
chrome.storage.local. - Network calls happen from the background service worker.
- The extension only sends context (title/URL/difficulty, your question, and editor code) when you click Get hint.
- No analytics.




