@rallycry/conveyor-agent 6.0.9 → 6.1.0

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.
@@ -1387,11 +1387,12 @@ async function emitResultEvent(event, host, context, startTime, lastAssistantUsa
1387
1387
  function handleRateLimitEvent(event, host) {
1388
1388
  const { rate_limit_info } = event;
1389
1389
  const status = rate_limit_info.status;
1390
- if (rate_limit_info.utilization !== void 0 && rate_limit_info.rateLimitType) {
1390
+ const utilization = rate_limit_info.utilization ?? (status === "rejected" ? 1 : void 0);
1391
+ if (utilization !== void 0 && rate_limit_info.rateLimitType) {
1391
1392
  host.connection.sendEvent({
1392
1393
  type: "rate_limit_update",
1393
1394
  rateLimitType: rate_limit_info.rateLimitType,
1394
- utilization: rate_limit_info.utilization,
1395
+ utilization,
1395
1396
  status
1396
1397
  });
1397
1398
  }
@@ -1403,8 +1404,8 @@ function handleRateLimitEvent(event, host) {
1403
1404
  safeVoid(host.callbacks.onEvent({ type: "error", message }), "rateLimitRejected");
1404
1405
  return resetsAt;
1405
1406
  } else if (status === "allowed_warning") {
1406
- const utilization = rate_limit_info.utilization ? `${Math.round(rate_limit_info.utilization * 100)}%` : "high";
1407
- const message = `Rate limit warning: ${utilization} utilization (type: ${rate_limit_info.rateLimitType ?? "unknown"})`;
1407
+ const utilizationLabel = rate_limit_info.utilization ? `${Math.round(rate_limit_info.utilization * 100)}%` : "high";
1408
+ const message = `Rate limit warning: ${utilizationLabel} utilization (type: ${rate_limit_info.rateLimitType ?? "unknown"})`;
1408
1409
  host.connection.sendEvent({ type: "thinking", message });
1409
1410
  safeVoid(host.callbacks.onEvent({ type: "thinking", message }), "rateLimitWarning");
1410
1411
  }
@@ -7544,4 +7545,4 @@ export {
7544
7545
  ProjectRunner,
7545
7546
  FileCache
7546
7547
  };
7547
- //# sourceMappingURL=chunk-R6BFXUS7.js.map
7548
+ //# sourceMappingURL=chunk-EUNUBCGF.js.map