44 lines
3.3 KiB
Plaintext
44 lines
3.3 KiB
Plaintext
# mp-silma-ai-aide
|
|
|
|
This project is a basic Vite + TypeScript Chrome extension scaffold. The extension side panel reads Gitea configuration from Vite env variables, stores side panel state in Zustand, and uses Axios to call the Gitea API.
|
|
|
|
Important files:
|
|
|
|
- `AGENTS.md`: Project instructions for coding agents.
|
|
- `manifest.llm.json`: Machine-readable project metadata.
|
|
- `docs/extension-management.md`: Chrome extension management instructions, including the required Chrome profile.
|
|
- `.env.example`: Required environment variables.
|
|
- `vite.config.ts`: Vite build config and generated Chrome extension manifest logic.
|
|
- `src/api.ts`: Axios client and Gitea configuration handling.
|
|
- `src/store.ts`: Vanilla Zustand side panel state store.
|
|
- `src/main.ts`: Side panel UI behavior.
|
|
- `index.html`: Side panel document.
|
|
- `public/icons/`: Extension icon source and generated PNG sizes copied into `dist/` by Vite.
|
|
- `public/local-context.json`: Generated workspace/repo/URL context copied into `dist/`.
|
|
- `scripts/generate-local-context.mjs`: Scans `/Users/Tabitha/.openclaw/workspace_Father` and writes `public/local-context.json`.
|
|
|
|
Build with `npm run build`. The deployable output directory is `dist/`; load that folder in Chrome as an unpacked extension or point deployment tooling at it. Do not edit `dist/` directly.
|
|
|
|
UI behavior: the app renders as a Chrome side panel, not a draggable window. The menu items are Add URL, URLs, Gitea Repos, Workspaces, Agents, and Add Issue. Add URL is enabled only when the active tab base URL is not already known; the user must choose either a workspace or a Gitea repo, and the app infers the linked counterpart. URLs can be deleted from the list; user-added URLs are removed from storage, while generated known URLs are hidden through stored deleted bases. The Agents view currently lists `GLOBAL AGENT` backed by `AGENTS.md`. Add Issue is enabled only when the active tab base URL is known and linked to a Gitea repo. It shows the target repo, captures visible-tab screenshots with thumbnails, accepts accumulated file attachments, lets the user select an agent file, creates the Gitea issue with the `Change Request` label, uploads all screenshots/files, then applies the `ready` label if requested. Captured screenshots can be expanded, removed, or cropped. Created issue bodies include `Chrome profile: Silma` and the selected agent. The Add Issue view also lists existing issues for the linked repo; selecting an issue shows the original description, issue attachments, comment chain, and a comment form with text, screenshots, and file attachments. Existing issue rows can be marked Ready or deleted after confirmation. Gitea repos are ordered by latest default-branch commit. Workspace and URL views show established links between local workspaces, known URLs, and Gitea repos.
|
|
|
|
Extension management rule: use the Codex Chrome extension with the Chrome profile named `Silma`. Do not use `Profile 1`.
|
|
|
|
Codex commands:
|
|
|
|
- Setup: `npm run codex:setup`
|
|
- Dev: `npm run dev:codex`
|
|
- Build: `npm run build:codex`
|
|
- Verify output: `npm run verify:dist`
|
|
|
|
Required env variables:
|
|
|
|
- `VITE_GITEA_BASE_URL`
|
|
- `VITE_GITEA_TOKEN`
|
|
- `VITE_GITEA_REPO_OWNER`
|
|
- `VITE_GITEA_REPO_NAME`
|
|
|
|
Gitea workflows:
|
|
|
|
- `.gitea/workflows/build.yml`: build validation for pushes to `main` and pull requests.
|
|
- `.gitea/workflows/issue-opened-placeholder.yml`: new issue placeholder that prints `200 okay`.
|