Implement brittle message count tracking to handle chat emissions after useChat API changes. Temporary fix until refactoring to new text stream approach recommended by LiveKit team. Ref: https://github.com/livekit/components-js/issues/1158
Implement brittle message count tracking to handle chat emissions after useChat API changes. Temporary fix until refactoring to new text stream approach recommended by LiveKit team. Ref: https://github.com/livekit/components-js/issues/1158