Files
calculate-version/app/log.js
T
jiantw83 3cf52a2302 feat: add role management and usage tracking modules
- Implemented role parsing and loading functionality in roles.js, allowing for structured role definitions with metadata.
- Added tests for role management to ensure correct parsing and loading of roles.
- Created usage.js to track API usage metrics, including token counts and rate limits.
- Developed tests for usage tracking to validate functionality and edge cases.
- Enhanced overall code structure and documentation for clarity and maintainability.
2026-06-25 09:13:15 +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}`);
}