feat: add LexAI status bar and suggestion panel
Some checks failed
CI — Test & Build / Test & Build (push) Has been cancelled
Some checks failed
CI — Test & Build / Test & Build (push) Has been cancelled
- Implemented a status bar item for LexAI with dynamic status updates (ready, processing, notReady). - Created a suggestion panel for displaying and interacting with AI-generated suggestions. - Added functionality for accepting, regenerating, and discarding suggestions within the suggestion zone. - Introduced configuration options for writing style, prompt patterns, personas, and formats. - Integrated progress indicators for long-running tasks and improved user feedback. - Established TypeScript configuration for the vscode package.
This commit is contained in:
@@ -1,49 +1,44 @@
|
||||
# Project memory — LexAI
|
||||
# Project memory
|
||||
|
||||
> Curated long-term knowledge that must survive sessions, compaction, and agent turnover. Loaded at every session start alongside `HANDOFF.md`. **Hard cap: 60 lines of entries.** When full, the `memory-sync` skill consolidates or archives before adding. Facts only — state goes in `HANDOFF.md`, mistakes in `LESSONS_LEARNED.md`, choices in `DECISIONS.md`.
|
||||
> Curated long-term knowledge. **Hard cap: 60 lines of entries.**
|
||||
|
||||
## Verified facts
|
||||
|
||||
Durable, evidence-backed truths about this project (domain rules, invariants, external realities).
|
||||
|
||||
- No backend: the background service worker is the only context that calls provider APIs; the user's key never leaves the extension except to the chosen provider.
|
||||
- LexAI has two clients: Chrome MV3 (repo root / WXT) and VS Code (`packages/vscode`).
|
||||
- Portable core: `src/lib/providers.ts`, `actions.ts`, `types.ts`. Chrome-only: `crypto.ts`, `messaging.ts`.
|
||||
- Providers: OpenAI, Anthropic, Groq, OpenRouter — routed by `callProvider` / `PROVIDER_SPECS`.
|
||||
- VS Code v1: Command Palette + editor context submenu; API key in Secret Storage; prefs `lexai.provider|model|writingStyle`.
|
||||
- Selection minimum length for actions: `MIN_SELECTION_LENGTH` (10) in `src/lib/actions.ts`.
|
||||
- Chrome message listener must `return true` for async replies; snapshot selection before `await`.
|
||||
|
||||
## Conventions
|
||||
|
||||
How this codebase does things (naming, structure, patterns a new agent must follow).
|
||||
|
||||
- UI is inline style objects (dark Catppuccin-ish palette); Tailwind is installed but inactive.
|
||||
- Each provider is duplicated as `callX` + `callXWithPrompt` — change both until T-04 refactors the layer.
|
||||
- Style Chrome UI with inline styles (Tailwind not wired).
|
||||
- Prefer encrypted Chrome key path; keep plaintext `apiKey` fallback until migration.
|
||||
- VS Code must not import `@lib/crypto` or `@lib/messaging`.
|
||||
- Root scripts: `vscode:install`, `vscode:build`, `vscode:typecheck`, `vscode:package`.
|
||||
|
||||
## Environment quirks
|
||||
|
||||
Non-obvious facts about tooling, commands, CI, or the operator's machine that repeatedly cost time to rediscover.
|
||||
|
||||
- `node_modules` is gitignored and absent by default — run `npm install` before any `npm run *`.
|
||||
- CI is Gitea (`.gitea/workflows/`), Node 22 pinned. Version must match in `package.json` and `wxt.config.ts`.
|
||||
- Node 22 pinned in CI; `npx wxt prepare` required before Chrome typecheck on fresh clone.
|
||||
- PowerShell may not accept `&&` — chain with `; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }`.
|
||||
|
||||
## Key paths and entry points
|
||||
|
||||
| What | Where |
|
||||
| --- | --- |
|
||||
| Content script (selection, toolbar, replace) | `entrypoints/content.ts` |
|
||||
| Background LLM proxy (providers, key decrypt) | `entrypoints/background.ts` |
|
||||
| Options (provider/model/key + encrypt) | `entrypoints/options/Options.tsx` |
|
||||
| Popup (standalone analyze) | `entrypoints/popup/Popup.tsx` |
|
||||
| Task list (from RECOMMENDATIONS) | `docs/TASKS.md` |
|
||||
| Chrome content / background / options / popup | `entrypoints/` |
|
||||
| Shared lib | `src/lib/` |
|
||||
| VS Code extension | `packages/vscode/src/extension.ts` |
|
||||
| VS Code bundle | `packages/vscode/out/extension.js` |
|
||||
| Model lanes | `docs/MODEL_ROUTING.md` |
|
||||
|
||||
## Expiring notes
|
||||
|
||||
Short-lived knowledge with an explicit expiry; `memory-sync` deletes past-due entries.
|
||||
|
||||
- _None yet. Format: `[YYYY-MM-DD expires] note`_
|
||||
- _None yet._
|
||||
|
||||
## Consolidation log
|
||||
|
||||
| Date | Action | Reason |
|
||||
| --- | --- | --- |
|
||||
| 2026-07-15 | Seeded initial facts, conventions, quirks, key paths | memory layer added |
|
||||
|
||||
---
|
||||
|
||||
*Write rules: one line per entry, evidence-backed, no secrets/personal data/transcripts. Every entry must answer "would a fresh agent waste tokens rediscovering this?" — if no, it doesn't belong here.*
|
||||
| 2026-08-13 | Seeded after VS Code v1 | `/project-init` stubs + port |
|
||||
|
||||
Reference in New Issue
Block a user