emit method
Appends a server-authored event of type with data to a conversation
(e.g. agent.typing, or a trigger opening a conversation).
Implementation
void emit(
String conversationId,
String type,
JsonMap data, {
String? turnId,
}) {
final conv = _conversations[conversationId];
if (conv == null) return;
conv.add(type, data, turnId: turnId);
}