@polka-codes/runner 0.9.34 → 0.9.35
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 +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30494,7 +30494,7 @@ var {
|
|
|
30494
30494
|
Help
|
|
30495
30495
|
} = import__.default;
|
|
30496
30496
|
// package.json
|
|
30497
|
-
var version = "0.9.
|
|
30497
|
+
var version = "0.9.35";
|
|
30498
30498
|
|
|
30499
30499
|
// src/runner.ts
|
|
30500
30500
|
import { execSync } from "node:child_process";
|
|
@@ -43665,10 +43665,10 @@ class UsageMeter {
|
|
|
43665
43665
|
};
|
|
43666
43666
|
const usage = "totalUsage" in resp ? resp.totalUsage : resp.usage;
|
|
43667
43667
|
const result = this.#calculageUsage(usage, resp.providerMetadata, modelInfo);
|
|
43668
|
-
this.#totals.input += result.input;
|
|
43669
|
-
this.#totals.output += result.output;
|
|
43670
|
-
this.#totals.cachedRead += result.cachedRead;
|
|
43671
|
-
this.#totals.cost += result.cost;
|
|
43668
|
+
this.#totals.input += result.input || 0;
|
|
43669
|
+
this.#totals.output += result.output || 0;
|
|
43670
|
+
this.#totals.cachedRead += result.cachedRead || 0;
|
|
43671
|
+
this.#totals.cost += result.cost || 0;
|
|
43672
43672
|
this.#totals.messageCount += 1;
|
|
43673
43673
|
}
|
|
43674
43674
|
setUsage(newUsage) {
|