@polka-codes/core 0.9.26 → 0.9.27
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 +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1375,8 +1375,8 @@ var UsageMeter = class {
|
|
|
1375
1375
|
}
|
|
1376
1376
|
/** Return true once either messages or cost exceed the configured caps. */
|
|
1377
1377
|
isLimitExceeded() {
|
|
1378
|
-
const messageCount = this.#maxMessages
|
|
1379
|
-
const cost = this.#maxCost
|
|
1378
|
+
const messageCount = this.#maxMessages > 0 && this.#calls >= this.#maxMessages;
|
|
1379
|
+
const cost = this.#maxCost > 0 && this.#totals.cost >= this.#maxCost;
|
|
1380
1380
|
return {
|
|
1381
1381
|
messageCount,
|
|
1382
1382
|
maxMessages: this.#maxMessages,
|