@saleso.innovations/bridge 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +3 -3
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -52,10 +52,10 @@ async function openAgentConnection(options) {
|
|
|
52
52
|
const content = typeof envelope.content === "string" ? envelope.content : "";
|
|
53
53
|
const agentId = typeof envelope.agentId === "string" ? envelope.agentId : options.agentId;
|
|
54
54
|
const conversationId = typeof envelope.conversationId === "string" ? envelope.conversationId : "unknown";
|
|
55
|
-
const
|
|
56
|
-
const reply = createReplySender(ws, agentId, conversationId,
|
|
55
|
+
const replyMessageId = randomUUID();
|
|
56
|
+
const reply = createReplySender(ws, agentId, conversationId, replyMessageId);
|
|
57
57
|
if (options.onUserMessage) {
|
|
58
|
-
await options.onUserMessage(content, { agentId, conversationId, messageId }, reply);
|
|
58
|
+
await options.onUserMessage(content, { agentId, conversationId, messageId: replyMessageId }, reply);
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
const echo = `Echo: ${content}`;
|