Conversation
…rompts Add read-only Fastify route plugin with three endpoints: - GET /api/config — returns agent configuration from config.yaml - GET /api/templates — lists templates with source tracking (local vs global) - GET /api/prompts — lists prompts with deduplication across local/global Closes #72
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Extract listPromptsWithSource and enrichEntryMetadata to core/prompt.ts (eliminates duplication between commands/list.ts and routes/config.ts) - Update commands/list.ts to use shared core/prompt.ts module - Simplify routes/config.ts: remove duplicate types and inline logic - Mock globalTemplatesDir/globalPromptsDir in route tests to prevent host filesystem leakage - Close Fastify instances in afterEach for proper cleanup - Fix dedup tests to exercise actual local-shadows-global behavior - Add tests for global-only entries and invalid YAML error path - Remove redundant shape-only test per TDD guidelines - Add auth expectation comment to route plugin - Add core/prompt.test.ts with 10 unit tests
Summary
src/server/routes/config.ts) with three endpoints:GET /api/config— returns agent configuration from config.yaml merged with defaultsGET /api/templates— lists templates with source tracking (local vs global), descriptions, and template variablesGET /api/prompts— lists prompts with deduplication across local/global directories, descriptions, and variablesTest plan
npm run typecheckpassesnpm test— all 229 tests pass (22 files)Closes #72