gcusage 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -15
- package/dist/core/aggregate.js +170 -0
- package/dist/core/commands/trim.js +63 -0
- package/dist/core/logs/index.js +43 -0
- package/dist/core/logs/split.js +50 -0
- package/dist/core/metrics/index.js +263 -0
- package/dist/core/range.js +57 -0
- package/dist/core/render/table.js +192 -0
- package/dist/core/run.js +65 -0
- package/dist/core/utils/format.js +45 -0
- package/dist/core/utils/period.js +8 -0
- package/dist/core/utils/time.js +69 -0
- package/dist/index.js +25 -926
- package/dist/messages.js +36 -0
- package/dist/types.js +2 -0
- package/package.json +2 -2
package/dist/messages.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MESSAGES = void 0;
|
|
4
|
+
exports.buildInvalidTimeMessage = buildInvalidTimeMessage;
|
|
5
|
+
exports.MESSAGES = {
|
|
6
|
+
CLI_NAME: "gcusage",
|
|
7
|
+
CLI_DESC: "统计 Gemini CLI token 使用情况",
|
|
8
|
+
OPTION_SINCE: "开始时间,支持相对时间",
|
|
9
|
+
OPTION_UNTIL: "结束时间,支持相对时间",
|
|
10
|
+
OPTION_PERIOD: "聚合周期:day|week|month|session",
|
|
11
|
+
OPTION_MODEL: "按模型过滤",
|
|
12
|
+
OPTION_TYPE: "按类型过滤",
|
|
13
|
+
OPTION_JSON: "输出 JSON",
|
|
14
|
+
PERIOD_INVALID: "非法的 --period 参数,仅支持 day|week|month|session",
|
|
15
|
+
SINCE_AFTER_UNTIL: "--since 不能晚于 --until",
|
|
16
|
+
NO_LOG_FOUND: "未找到任何日志文件:",
|
|
17
|
+
NO_TELEMETRY: "未找到 telemetry.log",
|
|
18
|
+
TRIM_DONE: "瘦身完成:telemetry.log 已仅保留 token 使用数据",
|
|
19
|
+
TRIM_DESC: "瘦身 telemetry.log,仅保留 token 使用数据",
|
|
20
|
+
NO_MATCHING: "无匹配数据",
|
|
21
|
+
REPORT_TITLE: "Gemini-cli Usage Report",
|
|
22
|
+
RANGE_SEP: " ~ ",
|
|
23
|
+
TOTAL_LABEL: "Total",
|
|
24
|
+
HEADER_DATE: "Date",
|
|
25
|
+
HEADER_MODELS: "Models",
|
|
26
|
+
HEADER_INPUT: "Input",
|
|
27
|
+
HEADER_OUTPUT: "Output",
|
|
28
|
+
HEADER_THOUGHT: "Thought",
|
|
29
|
+
HEADER_CACHE: "Cache",
|
|
30
|
+
HEADER_TOOL: "Tool",
|
|
31
|
+
HEADER_TOTAL_TOKENS: "Total Tokens",
|
|
32
|
+
HEADER_SESSION: "Session"
|
|
33
|
+
};
|
|
34
|
+
function buildInvalidTimeMessage(input) {
|
|
35
|
+
return `无法解析时间参数:${String(input)}`;
|
|
36
|
+
}
|
package/dist/types.js
ADDED
package/package.json
CHANGED