@opencompress/openclaw 3.0.5 → 3.0.6
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 +8 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
// src/config.ts
|
|
9
|
-
var VERSION = "3.0.
|
|
9
|
+
var VERSION = "3.0.6";
|
|
10
10
|
var PROXY_PORT = 8401;
|
|
11
11
|
var PROXY_HOST = "127.0.0.1";
|
|
12
12
|
var OCC_API = "https://www.opencompress.ai/api";
|
|
@@ -620,15 +620,20 @@ var plugin = {
|
|
|
620
620
|
const balance = Number(s.balanceUsd || s.balance || 0);
|
|
621
621
|
const calls = s.monthlyApiCalls ?? s.totalCalls ?? 0;
|
|
622
622
|
const rate = s.avgCompressionRate ? `${(Number(s.avgCompressionRate) * 100).toFixed(1)}%` : "N/A";
|
|
623
|
+
const tokensSaved = Number(s.totalOriginalTokens || 0) - Number(s.totalCompressedTokens || 0);
|
|
624
|
+
const totalCharged = Number(s.month?.totalCharged || 0);
|
|
625
|
+
const totalSaved = Number(s.month?.costSaved || s.totalSavings || 0);
|
|
623
626
|
return {
|
|
624
627
|
text: [
|
|
625
628
|
"```",
|
|
626
629
|
"OpenCompress Stats",
|
|
627
630
|
"==================",
|
|
628
|
-
`Balance: $${balance.toFixed(
|
|
631
|
+
`Balance: $${balance.toFixed(4)}`,
|
|
629
632
|
`API calls: ${calls}`,
|
|
630
633
|
`Avg compression: ${rate}`,
|
|
631
|
-
`Tokens saved: ${
|
|
634
|
+
`Tokens saved: ${tokensSaved.toLocaleString()}`,
|
|
635
|
+
`Money saved: $${totalSaved.toFixed(4)}`,
|
|
636
|
+
`Total charged: $${totalCharged.toFixed(4)}`,
|
|
632
637
|
"```",
|
|
633
638
|
"",
|
|
634
639
|
balance < 0.5 ? `Low balance. Link your account for $10 bonus: https://www.opencompress.ai/dashboard?link=${encodeURIComponent(key)}` : "Dashboard: https://www.opencompress.ai/dashboard"
|