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

Function createCorrelationId

webui/js/websocket.js:134–143  ·  view source on GitHub ↗
(prefix)

Source from the content-addressed store, hash-verified

132 * @returns {string}
133 */
134export function createCorrelationId(prefix) {
135 const uuid = generateUuid();
136 if (typeof prefix !== "string" || prefix.trim().length === 0) {
137 return uuid;
138 }
139
140 const normalizedPrefix = prefix.trim();
141 const suffix = normalizedPrefix.endsWith("-") ? "" : "-";
142 return `${normalizedPrefix}${suffix}${uuid}`;
143}
144
145/**
146 * @typedef {Object} NormalizedProducerOptions

Callers 9

testEmitFunction · 0.90
testRequestFunction · 0.90
testRequestTimeoutFunction · 0.90
testRequestAllFunction · 0.90
triggerBroadcastDemoFunction · 0.90
emitMethod · 0.85
requestMethod · 0.85

Calls 1

generateUuidFunction · 0.85

Tested by

no test coverage detected