@polka-codes/cli-shared 0.9.36 → 0.9.37

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -50160,6 +50160,7 @@ Request timeout after ${requestTimeoutSeconds} seconds. Canceling current reques
50160
50160
  };
50161
50161
  try {
50162
50162
  resetTimeout();
50163
+ const usageMeterOnFinishHandler = this.config.usageMeter.onFinishHandler(this.ai);
50163
50164
  const streamTextOptions = {
50164
50165
  model: this.ai,
50165
50166
  temperature: 0,
@@ -50178,7 +50179,10 @@ Request timeout after ${requestTimeoutSeconds} seconds. Canceling current reques
50178
50179
  break;
50179
50180
  }
50180
50181
  },
50181
- onFinish: this.config.usageMeter.onFinishHandler(this.ai),
50182
+ onFinish: (evt) => {
50183
+ usageMeterOnFinishHandler(evt);
50184
+ this.#callback({ kind: "Usage" /* Usage */, agent: this, usage: evt.totalUsage });
50185
+ },
50182
50186
  onError: async (error43) => {
50183
50187
  console.error("Error in stream:", error43);
50184
50188
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/cli-shared",
3
- "version": "0.9.36",
3
+ "version": "0.9.37",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",