(next: FreebuffSessionResponse)
| 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) { |
no test coverage detected