MCPcopy Create free account
hub / github.com/arctic-cli/interface / resolveAnthropicLimit

Function resolveAnthropicLimit

packages/arctic/src/provider/usage.ts:660–670  ·  view source on GitHub ↗
(data: any, label?: string)

Source from the content-addressed store, hash-verified

658 }
659
660 function resolveAnthropicLimit(data: any, label?: string): RateLimitWindowSummary | undefined {
661 if (!data || typeof data !== "object") return undefined
662 const utilization = typeof data.utilization === "number" ? data.utilization : undefined
663 const resetsAt = resolveAnthropicReset(data.resets_at)
664 if (utilization === undefined && resetsAt === undefined) return undefined
665 return {
666 usedPercent: utilization ?? null,
667 resetsAt,
668 label,
669 }
670 }
671
672 function resolveAnthropicReset(value: any): number | undefined {
673 if (!value || typeof value !== "string") return undefined

Callers 1

fetchAnthropicUsageFunction · 0.85

Calls 1

resolveAnthropicResetFunction · 0.85

Tested by

no test coverage detected