ec98bac14663dc6c508d1b47d678d0376a416a27
Some checks failed
CI — Test & Build / Test & Build (push) Has been cancelled
Root cause (dual bugs): 1. SCOPE BUG: snapStart/snapEnd/snapElement/snapRange were local vars inside runAction() but showModal() is a sibling function — those snap vars were never in scope inside the Replace button handler. The condition always silently fell through, doing nothing. 2. TIMING BUG: Selection was only captured on document mouseup, which could race against focus changes when clicking the toolbar. Fix: - showModal() now accepts snapStart/snapEnd/snapElement/snapRange as explicit parameters — guaranteed in-scope, no closure ambiguity - Each toolbar button mousedown calls captureForButton() BEFORE any focus shift can occur (belt-and-suspenders, works even if e.preventDefault fails) - Added console.log debug lines to Replace handler and runAction snapshot - selectionLocked reset on Escape and overlay click (was missing)
⚡ LexAI — AI Writing Assistant
A Grammarly-like Chrome Extension powered by your own LLM API key. No monthly subscription. Full control.
Features (Roadmap)
- ✅ Grammar & spelling correction
- ✅ Rephrase / rewrite text
- ✅ Shorten or expand text
- 🔜 Tone suggestions
- 🔜 Autocomplete
- 🔜 Custom style profiles
Supported LLM Providers
- OpenAI (GPT-4o, GPT-4o-mini)
- Anthropic (Claude 3.5 Haiku, Sonnet)
- Groq (free tier — fast!)
- OpenRouter (100+ models)
Tech Stack
- WXT + React 18 + TypeScript
- Tailwind CSS
- Zustand (state)
- Manifest V3
Development
npm install
npm run dev # Dev mode with hot reload
npm run build # Production build
npm run zip # Package for Chrome Web Store
npm test # Run unit tests
Load in Chrome
- Run
npm run build - Open Chrome →
chrome://extensions - Enable Developer Mode
- Click Load unpacked → select
.output/chrome-mv3
Project Management
Plane: LEXAI project → https://plane-pro.juankibin.space
Releases
1
LexAI v1.0.0
Latest
Languages
TypeScript
87.6%
JavaScript
9.7%
CSS
2.3%
HTML
0.4%