@polka-codes/cli-shared 0.9.12 → 0.9.14
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 +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27928,9 +27928,9 @@ class UsageMeter {
|
|
|
27928
27928
|
get usage() {
|
|
27929
27929
|
return { ...this.#totals, messageCount: this.#calls };
|
|
27930
27930
|
}
|
|
27931
|
-
printUsage() {
|
|
27931
|
+
printUsage(customConsole = console) {
|
|
27932
27932
|
const u = this.usage;
|
|
27933
|
-
|
|
27933
|
+
customConsole.log(`Usage - messages: ${u.messageCount}, input: ${u.input}, cached: ${u.cachedRead}, ` + `output: ${u.output}, cost: $${u.cost.toFixed(4)}`);
|
|
27934
27934
|
}
|
|
27935
27935
|
onFinishHandler(llm) {
|
|
27936
27936
|
return (evt) => {
|
|
@@ -52267,7 +52267,7 @@ var handler14 = async (provider2, args) => {
|
|
|
52267
52267
|
};
|
|
52268
52268
|
}
|
|
52269
52269
|
const { staged, file: file3, commitRange } = toolInfo14.parameters.parse(args);
|
|
52270
|
-
const commandParts = ["git", "diff", "--no-color"];
|
|
52270
|
+
const commandParts = ["git", "diff", "--no-color", "-U50"];
|
|
52271
52271
|
if (staged) {
|
|
52272
52272
|
commandParts.push("--staged");
|
|
52273
52273
|
}
|
|
@@ -58581,7 +58581,7 @@ ${event.systemPrompt}`);
|
|
|
58581
58581
|
======== Request Ended ========
|
|
58582
58582
|
`);
|
|
58583
58583
|
if (verbose) {
|
|
58584
|
-
usageMeter.printUsage();
|
|
58584
|
+
usageMeter.printUsage(customConsole);
|
|
58585
58585
|
}
|
|
58586
58586
|
break;
|
|
58587
58587
|
case "Usage" /* Usage */:
|