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

Function getFreebuffInstanceId

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

Source from the content-addressed store, hash-verified

191 * so in-flight agent work can keep streaming during the server-side grace
192 * window (server keeps the row alive until `expires_at + grace`). */
193export function getFreebuffInstanceId(): string | undefined {
194 const current = useFreebuffSessionStore.getState().session
195 if (!current) return undefined
196 switch (current.status) {
197 case 'queued':
198 case 'active':
199 case 'ended':
200 return current.instanceId
201 default:
202 return undefined
203 }
204}
205
206/** True when the session row represents a server-side slot the caller is
207 * holding (queued, active, or in the post-expiry grace window with a live

Callers 2

useSendMessageFunction · 0.90
tickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected