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

Function markFreebuffSessionEnded

cli/src/hooks/use-freebuff-session.ts:398–409  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

396 * Preserves any `rateLimitsByModel` snapshot from the prior session so the
397 * banner can show today's premium-session count without an extra fetch. */
398export function markFreebuffSessionEnded(): void {
399 if (!IS_FREEBUFF) return
400 controller?.abort()
401 const current = useFreebuffSessionStore.getState().session
402 const rateLimitsByModel = getRateLimitsByModel(current)
403 controller?.apply({
404 status: 'ended',
405 accessTier:
406 current && 'accessTier' in current ? current.accessTier : undefined,
407 rateLimitsByModel,
408 })
409}
410
411interface UseFreebuffSessionResult {
412 session: FreebuffSessionResponse | null

Callers 1

handleFreebuffGateErrorFunction · 0.90

Calls 1

getRateLimitsByModelFunction · 0.90

Tested by

no test coverage detected