MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / onlyUsedRateLimitsByModel

Function onlyUsedRateLimitsByModel

web/src/server/free-session/public-api.ts:189–197  ·  view source on GitHub ↗
(
  rateLimitsByModel: Record<string, FreebuffSessionRateLimit>,
)

Source from the content-addressed store, hash-verified

187}
188
189function onlyUsedRateLimitsByModel(
190 rateLimitsByModel: Record<string, FreebuffSessionRateLimit>,
191): Record<string, FreebuffSessionRateLimit> {
192 return Object.fromEntries(
193 Object.entries(rateLimitsByModel).filter(
194 ([, snapshot]) => snapshot.recentCount > 0,
195 ),
196 )
197}
198
199function nonEmptyRateLimitsByModel(
200 rateLimitsByModel: Record<string, FreebuffSessionRateLimit>,

Callers 2

attachRateLimitFunction · 0.85
noneResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected