()
| 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`). */ |
| 193 | export 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 |
no outgoing calls
no test coverage detected