MCPcopy Index your code
hub / github.com/agent0ai/agent-zero / emit

Method emit

webui/js/websocket.js:451–467  ·  view source on GitHub ↗
(eventType, data, options = {})

Source from the content-addressed store, hash-verified

449 }
450
451 async emit(eventType, data, options = {}) {
452 const correlationId =
453 normalizeCorrelationId(options?.correlationId) || createCorrelationId("emit");
454 const payload = this.buildPayload(data);
455 payload.correlationId = correlationId;
456
457 this.debugLog("emit", {
458 eventType,
459 correlationId,
460 });
461 this.ensurePayloadSize(payload);
462 await this.connect();
463 if (!this.isConnected()) {
464 throw new Error("Not connected");
465 }
466 this.socket.emit(eventType, payload);
467 }
468
469 async request(eventType, data, options = {}) {
470 const correlationId =

Callers 14

emit_toMethod · 0.45
broadcastMethod · 0.45
_flush_bufferMethod · 0.45
connectViewerFunction · 0.45
syncViewportFunction · 0.45
sendMouseFunction · 0.45
sendWheelFunction · 0.45
sendKeyFunction · 0.45
sendShortcutFunction · 0.45
cleanupFunction · 0.45
testEmitFunction · 0.45

Calls 7

buildPayloadMethod · 0.95
debugLogMethod · 0.95
ensurePayloadSizeMethod · 0.95
connectMethod · 0.95
isConnectedMethod · 0.95
normalizeCorrelationIdFunction · 0.85
createCorrelationIdFunction · 0.85

Tested by

no test coverage detected