Skip to content

fix(build): copy system prompt templates to dist during build#591

Merged
zbigniewsobiecki merged 1 commit intodevfrom
fix/build-copy-system-prompts
Mar 1, 2026
Merged

fix(build): copy system prompt templates to dist during build#591
zbigniewsobiecki merged 1 commit intodevfrom
fix/build-copy-system-prompts

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • Adds build:copy-system-prompts script to copy system prompt templates (.eta files) to dist/ during npm run build
  • Uses recursive copy (cp -r) for robustness, matching Docker COPY behavior
  • Fixes blank System Prompt tabs in Agent Definition Editor for non-Docker deployments

Code Quality

Also fixes 11 pre-existing lint warnings (noExplicitAny) in test files:

  • Adds proper mockAgentDefinition() helper in modelResolution.test.ts
  • Uses Object.hasOwn() instead of as any for property existence checks

Test plan

  • npm run build copies templates to dist/agents/prompts/templates/
  • All 3557 tests pass
  • Lint and typecheck pass with 0 warnings

🤖 Generated with Claude Code

The `npm run build` script was missing a step to copy system prompt
templates, causing blank System Prompt tabs in the Agent Definition
Editor for non-Docker deployments.

Changes:
- Add `build:copy-system-prompts` script that recursively copies
  `src/agents/prompts/templates/` to `dist/agents/prompts/templates/`
- Use `cp -r` for robustness (matches Docker COPY behavior)
- Also fixes 11 lint warnings (noExplicitAny) in test files by:
  - Adding proper `mockAgentDefinition()` helper in modelResolution.test.ts
  - Using `Object.hasOwn()` instead of `as any` for property checks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit e6a2aad into dev Mar 1, 2026
6 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/build-copy-system-prompts branch March 1, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant