adp-openclaw 0.0.18 → 0.0.19
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/package.json +1 -1
- package/src/monitor.ts +5 -22
package/package.json
CHANGED
package/src/monitor.ts
CHANGED
|
@@ -379,28 +379,11 @@ async function connectAndHandle(params: ConnectParams): Promise<void> {
|
|
|
379
379
|
// Debug log for all deliver calls - log the actual info object
|
|
380
380
|
log?.info(`[adp-openclaw] deliver called: kind=${kind}, text.length=${text.length}, info=${JSON.stringify(info)}`);
|
|
381
381
|
|
|
382
|
-
// Handle streaming block -
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
type: MsgType.OutboundChunk,
|
|
388
|
-
requestId: generateRequestId(),
|
|
389
|
-
payload: {
|
|
390
|
-
to: inMsg.from,
|
|
391
|
-
chunk: text,
|
|
392
|
-
conversationId: inMsg.conversationId,
|
|
393
|
-
recordId: inMsg.recordId, // Pass recordId back to server
|
|
394
|
-
streamId: streamId,
|
|
395
|
-
index: chunkIndex,
|
|
396
|
-
isPartial: true, // Mark as partial chunk, final data will be in outbound_end
|
|
397
|
-
user: inMsg.user,
|
|
398
|
-
},
|
|
399
|
-
timestamp: Date.now(),
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
ws.send(JSON.stringify(chunkMsg));
|
|
403
|
-
chunkIndex++;
|
|
382
|
+
// Handle streaming block - IGNORE because handlePartial already sent deltas
|
|
383
|
+
// The "block" callback contains cumulative text (same as final), not incremental delta
|
|
384
|
+
// Sending it would cause duplicate data on the server side
|
|
385
|
+
if (kind === "block") {
|
|
386
|
+
log?.debug?.(`[adp-openclaw] Ignoring block callback (handlePartial already sent deltas), text.length=${text.length}`);
|
|
404
387
|
return;
|
|
405
388
|
}
|
|
406
389
|
|