replicas-cli 0.3.467 → 0.3.469
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/index.cjs +5 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -37658,7 +37658,9 @@ function toolCallMessage(id, name, args, timestamp, result) {
|
|
|
37658
37658
|
function parseReplicasEvents(events) {
|
|
37659
37659
|
const messages = [];
|
|
37660
37660
|
const toolCalls = /* @__PURE__ */ new Map();
|
|
37661
|
-
const
|
|
37661
|
+
const latestMs = (types) => Math.max(0, ...events.filter((event) => types.includes(event.type)).map((event) => Date.parse(event.timestamp)));
|
|
37662
|
+
const streamEndedMs = latestMs(["assistant_message", "error", "status"].map((type) => `${HARNESS_EVENT_TYPE_PREFIX}${type}`));
|
|
37663
|
+
const livePartialMs = latestMs([CLAUDE_PARTIAL_MESSAGE_EVENT_TYPE]);
|
|
37662
37664
|
events.forEach((event) => {
|
|
37663
37665
|
const { payload, timestamp } = event;
|
|
37664
37666
|
const message2 = isRecord(payload.message) ? payload.message : {};
|
|
@@ -37725,7 +37727,7 @@ function parseReplicasEvents(events) {
|
|
|
37725
37727
|
return;
|
|
37726
37728
|
case CLAUDE_PARTIAL_MESSAGE_EVENT_TYPE: {
|
|
37727
37729
|
const partial2 = coerceClaudePartialMessagePayload(payload);
|
|
37728
|
-
if (!partial2 || Date.parse(event.timestamp) <=
|
|
37730
|
+
if (!partial2 || Date.parse(event.timestamp) <= streamEndedMs || Date.parse(event.timestamp) < livePartialMs) return;
|
|
37729
37731
|
if (partial2.thinking) upsertDisplayMessage(messages, { id: `replicas-partial-${partial2.streamId}-thinking`, type: "reasoning", content: partial2.thinking, status: "in_progress", timestamp });
|
|
37730
37732
|
if (partial2.text) upsertDisplayMessage(messages, { id: `replicas-partial-${partial2.streamId}`, type: "agent", content: partial2.text, timestamp });
|
|
37731
37733
|
return;
|
|
@@ -39627,7 +39629,7 @@ var CLI_VERSION;
|
|
|
39627
39629
|
var init_cli_version = __esm({
|
|
39628
39630
|
"../shared/src/cli-version.ts"() {
|
|
39629
39631
|
"use strict";
|
|
39630
|
-
CLI_VERSION = "0.3.
|
|
39632
|
+
CLI_VERSION = "0.3.469";
|
|
39631
39633
|
}
|
|
39632
39634
|
});
|
|
39633
39635
|
|