918
*/
919
private _startClientToolCallDisconnectTimeout(clientId: string, session: string, chatChannel: string): void {
921
>
if (!record) {
922
// Client is connected; the grace machinery does not apply.
923
return;
924
}
926
>
const elapsed = Date.now() - record.lastSeenAt;
927
>
const delay = Math.max(0, CLIENT_TOOL_CALL_DISCONNECT_TIMEOUT - elapsed);
928
>
record.disconnectTimeouts.set(chatChannel, disposableTimeout(() => {
929
this._releaseActiveClientForSession(session, clientId, chatChannel);
931
>
}
932
933
/**