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

Function apply

cli/src/hooks/use-freebuff-session.ts:462–474  ·  view source on GitHub ↗
(next: FreebuffSessionResponse)

Source from the content-addressed store, hash-verified

460 let nextMethod: 'GET' | 'POST' = 'GET'
461
462 const apply = (next: FreebuffSessionResponse) => {
463 if (next.status === 'queued' || next.status === 'active') {
464 useFreebuffModelStore.getState().setSelectedModel(next.model)
465 recordFreebuffInstanceOwner(next.instanceId)
466 } else if (next.status === 'none' && next.accessTier === 'limited') {
467 useFreebuffModelStore
468 .getState()
469 .setSelectedModel(LIMITED_FREEBUFF_MODEL_ID)
470 }
471 setSession(next)
472 setError(null)
473 previousStatus = next.status
474 }
475
476 const clearTimer = () => {
477 if (timer) {

Callers 2

tickFunction · 0.85
useFreebuffSessionFunction · 0.85

Calls 2

setErrorFunction · 0.85

Tested by

no test coverage detected