@tokz/cli 0.2.15 → 0.2.16
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.
|
@@ -867,8 +867,20 @@ async function parseCodexRollout(file, seen = /* @__PURE__ */ new Set()) {
|
|
|
867
867
|
const totals = rawUsage(info.total_token_usage);
|
|
868
868
|
const last = rawUsage(info.last_token_usage);
|
|
869
869
|
if (!last && !totals) continue;
|
|
870
|
-
|
|
871
|
-
if (totals)
|
|
870
|
+
let usage2;
|
|
871
|
+
if (totals) {
|
|
872
|
+
if (prev && totals.total === prev.total && totals.input === prev.input && totals.output === prev.output && totals.cached === prev.cached) {
|
|
873
|
+
continue;
|
|
874
|
+
}
|
|
875
|
+
if (prev && totals.total < prev.total) {
|
|
876
|
+
usage2 = last ?? totals;
|
|
877
|
+
} else {
|
|
878
|
+
usage2 = subtractUsage(totals, prev);
|
|
879
|
+
}
|
|
880
|
+
prev = totals;
|
|
881
|
+
} else {
|
|
882
|
+
usage2 = last;
|
|
883
|
+
}
|
|
872
884
|
if (usage2.input === 0 && usage2.cached === 0 && usage2.output === 0 && usage2.reasoning === 0) {
|
|
873
885
|
continue;
|
|
874
886
|
}
|
package/dist/cli.js
CHANGED
|
@@ -276,7 +276,7 @@ program.action(async () => {
|
|
|
276
276
|
const [{ render }, React, { Root }, { Fullscreen }] = await Promise.all([
|
|
277
277
|
import("ink"),
|
|
278
278
|
import("react"),
|
|
279
|
-
import("./Root-
|
|
279
|
+
import("./Root-NB26ZIPU.js"),
|
|
280
280
|
import("./Fullscreen-GK2ZYXHV.js")
|
|
281
281
|
]);
|
|
282
282
|
render(React.createElement(Fullscreen, null, React.createElement(Root)));
|