Files
ai-code-review/app/log.js
T
jiantw83 525f6f9350 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.
2026-06-25 09:34:59 +00:00

39 lines
875 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export function section(title) {
console.log(`\n=== ${title} ===`);
}
export function step(stepName, title) {
console.log(`\n[${stepName}] ${title}`);
}
export function line(message) {
console.log(` - ${message}`);
}
/** 階段輸入:這個階段吃進什麼。 */
export function input(message) {
console.log(` ← 輸入:${message}`);
}
/** 階段輸出:這個階段產出什麼。 */
export function output(message) {
console.log(` → 輸出:${message}`);
}
/** 檢查/把關結果:明確標示成功或失敗。 */
export function result(passed, message) {
console.log(` ${passed ? '✅ 成功' : '❌ 失敗'}${message}`);
}
export function ok(message) {
console.log(` ✓ ${message}`);
}
export function warn(message) {
console.warn(` ! ${message}`);
}
export function error(message) {
console.error(` x ${message}`);
}