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

Function shouldReleaseSlot

cli/src/hooks/use-freebuff-session.ts:210–217  ·  view source on GitHub ↗

True when the session row represents a server-side slot the caller is * holding (queued, active, or in the post-expiry grace window with a live * instance id). DELETE only matters in those states; otherwise we'd fire a * spurious request the server has nothing to act on.

(current: FreebuffSessionResponse | null)

Source from the content-addressed store, hash-verified

208 * instance id). DELETE only matters in those states; otherwise we'd fire a
209 * spurious request the server has nothing to act on. */
210function shouldReleaseSlot(current: FreebuffSessionResponse | null): boolean {
211 if (!current) return false
212 return (
213 current.status === 'queued' ||
214 current.status === 'active' ||
215 (current.status === 'ended' && Boolean(current.instanceId))
216 )
217}
218
219function toLandingSession(
220 current: FreebuffSessionResponse | null,

Callers 2

releaseFreebuffSlotFunction · 0.85
useFreebuffSessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected