Implement asynchronous dialog events and update events.res