(cb: () => void)
| 58 | } |
| 59 | |
| 60 | export function registerSessionActivityCallback(cb: () => void): void { |
| 61 | activityCallback = cb |
| 62 | // Restart timer if work is already in progress (e.g. reconnect during streaming) |
| 63 | if (refcount > 0 && heartbeatTimer === null) { |
| 64 | startHeartbeatTimer() |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | export function unregisterSessionActivityCallback(): void { |
| 69 | activityCallback = null |
no test coverage detected