@polka-codes/cli 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.
- package/dist/index.js +6 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58608,7 +58608,7 @@ var {
|
|
|
58608
58608
|
Help
|
|
58609
58609
|
} = import__.default;
|
|
58610
58610
|
// package.json
|
|
58611
|
-
var version = "0.9.
|
|
58611
|
+
var version = "0.9.37";
|
|
58612
58612
|
|
|
58613
58613
|
// src/commands/chat.ts
|
|
58614
58614
|
import { readFile as readFile3 } from "node:fs/promises";
|
|
@@ -85621,6 +85621,7 @@ Request timeout after ${requestTimeoutSeconds} seconds. Canceling current reques
|
|
|
85621
85621
|
};
|
|
85622
85622
|
try {
|
|
85623
85623
|
resetTimeout();
|
|
85624
|
+
const usageMeterOnFinishHandler = this.config.usageMeter.onFinishHandler(this.ai);
|
|
85624
85625
|
const streamTextOptions = {
|
|
85625
85626
|
model: this.ai,
|
|
85626
85627
|
temperature: 0,
|
|
@@ -85639,7 +85640,10 @@ Request timeout after ${requestTimeoutSeconds} seconds. Canceling current reques
|
|
|
85639
85640
|
break;
|
|
85640
85641
|
}
|
|
85641
85642
|
},
|
|
85642
|
-
onFinish:
|
|
85643
|
+
onFinish: (evt) => {
|
|
85644
|
+
usageMeterOnFinishHandler(evt);
|
|
85645
|
+
this.#callback({ kind: "Usage" /* Usage */, agent: this, usage: evt.totalUsage });
|
|
85646
|
+
},
|
|
85643
85647
|
onError: async (error43) => {
|
|
85644
85648
|
console.error("Error in stream:", error43);
|
|
85645
85649
|
},
|