chore(coding-agent): composed HTML export template at runtime instead of committing generated artifacts
- Replaced the committed `template.generated.ts` with Bun text imports (`with { type: "text" }`) of `template.html/css/js` plus the gitignored `tool-views.generated.js`, composed in a memoized `getTemplate()` in `src/export/html/index.ts`.
- Deleted `scripts/generate-template.ts` and the unused `template.macro.ts`; removed the stale package-level `.gitignore` and the `biome.json` exclusion for the generated file.
- Wired root `prepare` to `generate-docs-index` + new `build-tool-views` script and coding-agent `prepack` to rebuild tool views before `bundle-dist`, so source runs and publishes never need a manual generate step.
- Added narrow ambient text-module declarations (`*.css`, `*/template.js`, `*.generated.js`) to `bun-imports.d.ts`; `*.html` stays untyped because bun-types claims it as `HTMLBundle`, so the import casts at the use site.
- Updated `DEVELOPMENT.md` and `docs/porting-from-pi-mono.md` references; the rewritten import block transiently carries `loadEntriesFromFile`, consumed by the next commit's sub-session loader.
This commit is contained in:
@@ -1111,8 +1111,8 @@ Use only script names that exist in `packages/coding-agent/package.json`:
|
||||
- `bun --cwd=packages/coding-agent run format-prompts`
|
||||
- Regenerate docs index files for package docs:
|
||||
- `bun --cwd=packages/coding-agent run generate-docs-index`
|
||||
- Regenerate template artifacts:
|
||||
- `bun --cwd=packages/coding-agent run generate-template`
|
||||
- Rebuild the embedded React tool renderers (after changing collab-web `src/tool-render/`):
|
||||
- `bun --cwd=packages/collab-web run build:tool-views`
|
||||
- Build compiled binary artifact (`dist/omp`):
|
||||
- `bun --cwd=packages/coding-agent run build`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user