feat: add role management and usage tracking for AI code review

- Implemented role parsing and loading from markdown files, including attributes like name, side, focus, badge, color, and personality.
- Created functions to build prompts for analysis, line location, and verdicts based on roles.
- Added tests for role management functionalities to ensure correct parsing and loading of roles.
- Developed usage tracking for AI assistant interactions, including token usage and rate limits.
- Implemented functions to extract and record usage data from various LLM providers.
- Added tests for usage tracking functionalities to validate correct accumulation and reporting of usage statistics.
This commit is contained in:
2026-06-25 09:34:59 +00:00
parent 120b83c904
commit 525f6f9350
37 changed files with 6405 additions and 23 deletions
+13
View File
@@ -0,0 +1,13 @@
{
"name": "ai-code-review",
"version": "1.0.0",
"type": "module",
"scripts": {
"test": "node --test *.test.js"
},
"dependencies": {
"axios": "^1.6.7",
"js-yaml": "^4.1.0",
"openai": "^4.28.0"
}
}