39 lines
1.5 KiB
Markdown
39 lines
1.5 KiB
Markdown
|
|
# AGENTS.md
|
||
|
|
|
||
|
|
## Project
|
||
|
|
|
||
|
|
`mp-silma-ai-aide` is a Vite + TypeScript Chrome extension scaffold. The built `dist/` directory is intended to be loaded in Chrome as an unpacked Manifest V3 extension.
|
||
|
|
|
||
|
|
## Commands
|
||
|
|
|
||
|
|
- Install dependencies: `npm install`
|
||
|
|
- Run local Vite dev server: `npm run dev`
|
||
|
|
- Build extension: `npm run build`
|
||
|
|
- Preview build output: `npm run preview`
|
||
|
|
|
||
|
|
## Environment
|
||
|
|
|
||
|
|
Configuration is read from Vite environment variables:
|
||
|
|
|
||
|
|
- `VITE_GITEA_BASE_URL`: Base URL for the Gitea instance, for example `http://gitea.orson.tealthrone`.
|
||
|
|
- `VITE_GITEA_TOKEN`: Gitea API token.
|
||
|
|
- `VITE_GITEA_REPO_OWNER`: Target Gitea owner. Default: `jacob-mathison`.
|
||
|
|
- `VITE_GITEA_REPO_NAME`: Target Gitea repository. Default: `mp-silma-ai-aide`.
|
||
|
|
|
||
|
|
Use `.env.local` for local secrets. Keep `.env.local` and any real token-bearing env files out of git. Update `.env.example` when adding new required variables.
|
||
|
|
|
||
|
|
## Extension Build Notes
|
||
|
|
|
||
|
|
- `vite.config.ts` emits `dist/manifest.json` during production builds.
|
||
|
|
- `dist/` is generated output and should not be edited directly.
|
||
|
|
- Host permissions are derived from `VITE_GITEA_BASE_URL`. Rebuild after changing the base URL.
|
||
|
|
- Runtime API calls are centralized in `src/api.ts`.
|
||
|
|
- Popup state is centralized in the vanilla Zustand store at `src/store.ts`.
|
||
|
|
|
||
|
|
## Coding Guidelines
|
||
|
|
|
||
|
|
- Keep the app TypeScript-first and strict.
|
||
|
|
- Prefer small, focused modules under `src/`.
|
||
|
|
- Do not commit secrets or generated build output.
|
||
|
|
- Run `npm run build` before handing off code changes.
|