@ccusage/codex 17.2.1 → 18.0.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/dist/index.js +8 -2
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -895,7 +895,7 @@ async function executeCommand(cmd, ctx, name$1) {
|
|
|
895
895
|
await resolved.run(ctx);
|
|
896
896
|
}
|
|
897
897
|
var name = "@ccusage/codex";
|
|
898
|
-
var version = "
|
|
898
|
+
var version = "18.0.2";
|
|
899
899
|
var description = "Usage analysis tool for OpenAI Codex sessions";
|
|
900
900
|
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
901
901
|
let messages = [];
|
|
@@ -2681,8 +2681,14 @@ function formatCurrency(amount) {
|
|
|
2681
2681
|
return `$${amount.toFixed(2)}`;
|
|
2682
2682
|
}
|
|
2683
2683
|
function formatModelName(modelName) {
|
|
2684
|
-
const
|
|
2684
|
+
const piMatch = modelName.match(/^\[pi\] (.+)$/);
|
|
2685
|
+
if (piMatch?.[1] != null) return `[pi] ${formatModelName(piMatch[1])}`;
|
|
2686
|
+
const anthropicMatch = modelName.match(/^anthropic\/claude-(\w+)-([\d.]+)$/);
|
|
2687
|
+
if (anthropicMatch != null) return `${anthropicMatch[1]}-${anthropicMatch[2]}`;
|
|
2688
|
+
const match = modelName.match(/^claude-(\w+)-([\d-]+)-(\d{8})$/);
|
|
2685
2689
|
if (match != null) return `${match[1]}-${match[2]}`;
|
|
2690
|
+
const noDateMatch = modelName.match(/^claude-(\w+)-([\d-]+)$/);
|
|
2691
|
+
if (noDateMatch != null) return `${noDateMatch[1]}-${noDateMatch[2]}`;
|
|
2686
2692
|
return modelName;
|
|
2687
2693
|
}
|
|
2688
2694
|
function formatModelsDisplayMultiline(models) {
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccusage/codex",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "18.0.2",
|
|
4
5
|
"description": "Usage analysis tool for OpenAI Codex sessions",
|
|
6
|
+
"author": "ryoppippi",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"funding": "https://github.com/ryoppippi/ccusage?sponsor=1",
|
|
5
9
|
"homepage": "https://github.com/ryoppippi/ccusage#readme",
|
|
6
|
-
"bugs": {
|
|
7
|
-
"url": "https://github.com/ryoppippi/ccusage/issues"
|
|
8
|
-
},
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
11
12
|
"url": "git+https://github.com/ryoppippi/ccusage.git"
|
|
12
13
|
},
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"type": "module",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/ryoppippi/ccusage/issues"
|
|
16
|
+
},
|
|
17
17
|
"main": "./dist/index.js",
|
|
18
18
|
"module": "./dist/index.js",
|
|
19
19
|
"bin": {
|