@alfe.ai/openclaw-chat 0.0.10 → 0.0.11
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/plugin2.js +5 -4
- package/package.json +1 -1
package/dist/plugin2.js
CHANGED
|
@@ -335,12 +335,12 @@ async function handleAgentRequest(request, log) {
|
|
|
335
335
|
chatClient?.sendResponse(request.id, false, { message: "OpenClaw SDK not available — cannot dispatch" });
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
|
-
const { message, sessionKey: legacySessionKey, userId, conversationId, tenantId, clientType } = request.params;
|
|
338
|
+
const { message, sessionKey: legacySessionKey, userId, conversationId, tenantId, clientType, displayName } = request.params;
|
|
339
339
|
if (!message) {
|
|
340
340
|
chatClient?.sendResponse(request.id, false, { message: "Missing message" });
|
|
341
341
|
return;
|
|
342
342
|
}
|
|
343
|
-
const senderId = userId ?? `anon-${legacySessionKey.slice(0, 12)}`;
|
|
343
|
+
const senderId = displayName ?? userId ?? `anon-${legacySessionKey.slice(0, 12)}`;
|
|
344
344
|
const cfg = runtime.config.loadConfig();
|
|
345
345
|
const sessionId = conversationId ?? legacySessionKey;
|
|
346
346
|
if (!await getSession(sessionId)) await createSession(sessionId, "", "alfe", tenantId, userId);
|
|
@@ -360,7 +360,7 @@ async function handleAgentRequest(request, log) {
|
|
|
360
360
|
});
|
|
361
361
|
});
|
|
362
362
|
try {
|
|
363
|
-
const conversationLabel = userId ? `Chat with ${userId}` : `Alfe chat`;
|
|
363
|
+
const conversationLabel = displayName ? `Chat with ${displayName}` : userId ? `Chat with ${userId}` : `Alfe chat`;
|
|
364
364
|
resolvedOpenClawKey = (await dispatchInbound({
|
|
365
365
|
cfg,
|
|
366
366
|
runtime: { channel: runtime.channel },
|
|
@@ -381,7 +381,8 @@ async function handleAgentRequest(request, log) {
|
|
|
381
381
|
extraContext: {
|
|
382
382
|
...tenantId ? { TenantId: tenantId } : {},
|
|
383
383
|
...clientType ? { ClientType: clientType } : {},
|
|
384
|
-
...conversationId ? { ConversationId: conversationId } : {}
|
|
384
|
+
...conversationId ? { ConversationId: conversationId } : {},
|
|
385
|
+
...displayName ? { SenderName: displayName } : {}
|
|
385
386
|
},
|
|
386
387
|
deliver: async (payload) => {
|
|
387
388
|
const responseText = payload.text ?? "";
|