john kevin asprec 6aee260533
All checks were successful
CI — Test & Build / Test & Build (push) Successful in 1m33s
fix: never send an API key to the provider it wasn't entered for (v1.0.2)
A stored key carried no record of which provider it belonged to. Options
saves {provider, model} without the key whenever the field is blank (which
it always is after a save, since it shows the encrypted badge instead), so
switching provider left the previous provider's key attached to the new one.
Every call then failed with that provider's own "Invalid API Key" while the
UI still showed a key as configured.

- types.ts: new `keyProvider` storage field, added to CONFIG_STORAGE_KEYS
- background.ts: keyProviderMismatch() guards the chat, COPY_AS and
  stored-key LIST_MODELS paths; absent keyProvider (pre-upgrade) is allowed
- Options.tsx: stamps keyProvider on every save; drops the encrypted badge
  and requires a new key when the saved one belongs to another provider or
  is rejected; save-time guard messages are now actually rendered (they were
  gated on modelsStatus === 'error' and never drew, so Save looked dead)
- providers.ts: providerLabel(); settings hint appended to 401/403 only;
  listModels reports keyRejected and labels errors with the display name
- Anthropic: send anthropic-dangerous-direct-browser-access on the chat path

Docs: CLAUDE.md version-bump rule corrected — wxt.config.ts reads
pkg.version, so package.json is the only place to edit.

typecheck clean, 58/58 tests, build clean (281.72 kB, manifest 1.0.2).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:50:07 +08:00
2026-03-06 13:12:30 +08:00

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
  • Manifest V3
  • Inline-styled UI (no CSS framework)

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

  1. Run npm run build
  2. Open Chrome → chrome://extensions
  3. Enable Developer Mode
  4. Click Load unpacked → select .output/chrome-mv3

Project Management

Plane: LEXAI project → https://plane-pro.juankibin.space

Description
Bring your own LLM key. LexAI helps you write and work with code in VS Code / Cursor — no LexAI account, no subscription, no LexAI servers.
Readme MIT 3.8 MiB
LexAI v1.0.0 Latest
2026-03-11 09:38:00 +00:00
Languages
TypeScript 87.6%
JavaScript 9.7%
CSS 2.3%
HTML 0.4%