This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
- Codex setup: `npm run codex:setup`
|
||||
- Run local Vite dev server: `npm run dev`
|
||||
- Run app in Codex: `npm run dev:codex`
|
||||
- Run live local context server: `npm run context:serve`
|
||||
- Build extension: `npm run build`
|
||||
- Build extension in Codex: `npm run build:codex`
|
||||
- Preview build output: `npm run preview`
|
||||
@@ -28,6 +29,7 @@ Configuration is read from Vite environment variables:
|
||||
- `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`.
|
||||
- `VITE_LOCAL_CONTEXT_URL`: Optional live local context endpoint. Default: `http://127.0.0.1:23873/local-context.json`.
|
||||
|
||||
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.
|
||||
|
||||
@@ -39,6 +41,8 @@ Use `.env.local` for local secrets. Keep `.env.local` and any real token-bearing
|
||||
- Static extension assets live in `public/`; extension icon sources live under `public/icons/`.
|
||||
- `scripts/generate-local-context.mjs` generates `public/local-context.json` from `/Users/Tabitha/.openclaw/workspace_Father` and configured local folder search roots before builds.
|
||||
- `public/local-context.json` is a committed fallback snapshot so CI builds can still produce a self-contained `dist/` if the local workspace root is unavailable. It includes generated workspaces, Gitea worktrees, known URLs, and searchable folder candidates for workspace selection.
|
||||
- `scripts/serve-local-context.mjs` serves a live local context endpoint that rescans workspaces on each request. Run `npm run context:serve` while using the extension locally when new projects should appear without rebuilding/reloading the bundled snapshot.
|
||||
- The side panel tries `VITE_LOCAL_CONTEXT_URL` first, falls back to bundled `/local-context.json`, and polls live local context every 10 seconds while URLs, Prompts, Workspaces, Add URL, or Add Workspace are active.
|
||||
- `npm run build` runs `scripts/verify-dist.mjs` after Vite to ensure the generated output has the required extension files.
|
||||
- Host permissions include `<all_urls>` for Chrome visible-tab screenshot capture plus the Gitea host derived from `VITE_GITEA_BASE_URL`. Rebuild after changing the base URL.
|
||||
- Runtime API calls are centralized in `src/api.ts`.
|
||||
|
||||
Reference in New Issue
Block a user