replicas-cli 0.3.30 → 0.3.32

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.
Files changed (2) hide show
  1. package/dist/index.cjs +11 -7
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -27563,6 +27563,7 @@ function parseClaudeEvents(events, parentToolUseId) {
27563
27563
  const acceptedUserMessageIndexes = /* @__PURE__ */ new Set();
27564
27564
  const canonicalUserMessageIndexes = /* @__PURE__ */ new Set();
27565
27565
  const supersededUserMessageIndexes = /* @__PURE__ */ new Set();
27566
+ const stampedUserMessages = /* @__PURE__ */ new Set();
27566
27567
  const findMatchingUserMessageIndex = (indexes, content, timestamp, messageId) => {
27567
27568
  if (typeof messageId === "string") {
27568
27569
  const byId = messages.findIndex((message2, index) => message2.type === "user" && message2.id === messageId && !supersededUserMessageIndexes.has(index));
@@ -27570,15 +27571,16 @@ function parseClaudeEvents(events, parentToolUseId) {
27570
27571
  }
27571
27572
  return [...indexes].find((index) => {
27572
27573
  const message2 = messages[index];
27573
- return message2?.type === "user" && areUserMessagesWithinMatchWindow(message2, { content, timestamp });
27574
+ return message2?.type === "user" && !(typeof messageId === "string" && stampedUserMessages.has(message2)) && areUserMessagesWithinMatchWindow(message2, { content, timestamp });
27574
27575
  });
27575
27576
  };
27576
27577
  const taskAccumulator = new TaskAccumulator();
27577
- const taskSnapshot = () => taskAccumulator.getTasks().map((task) => ({
27578
- text: task.subject,
27579
- completed: task.status === "completed",
27580
- itemStatus: task.status
27581
- }));
27578
+ const todoItems = /* @__PURE__ */ new WeakMap();
27579
+ const taskSnapshot = () => taskAccumulator.getTasks().map((task) => {
27580
+ const item = todoItems.get(task) ?? { text: task.subject, completed: task.status === "completed", itemStatus: task.status };
27581
+ todoItems.set(task, item);
27582
+ return item;
27583
+ });
27582
27584
  filteredEvents.forEach((event) => {
27583
27585
  if (event.type === "event_msg" && event.payload.type === "user_message") {
27584
27586
  const content = typeof event.payload.message === "string" ? event.payload.message : "";
@@ -27600,6 +27602,7 @@ function parseClaudeEvents(events, parentToolUseId) {
27600
27602
  messages[canonicalIndex] = message2;
27601
27603
  canonicalUserMessageIndexes.delete(canonicalIndex);
27602
27604
  }
27605
+ if (typeof messageId === "string" || canonical && stampedUserMessages.has(canonical)) stampedUserMessages.add(message2);
27603
27606
  }
27604
27607
  return;
27605
27608
  }
@@ -27686,6 +27689,7 @@ function parseClaudeEvents(events, parentToolUseId) {
27686
27689
  } else {
27687
27690
  messages[acceptedIndex] = message2;
27688
27691
  }
27692
+ if (typeof stampedId === "string" || accepted && stampedUserMessages.has(accepted)) stampedUserMessages.add(message2);
27689
27693
  }
27690
27694
  }
27691
27695
  if (event.type === "claude-assistant") {
@@ -28430,7 +28434,7 @@ var headlessAgentRequestSchema = external_exports.object({
28430
28434
  });
28431
28435
 
28432
28436
  // ../shared/src/cli-version.ts
28433
- var CLI_VERSION = "0.3.30";
28437
+ var CLI_VERSION = "0.3.32";
28434
28438
 
28435
28439
  // ../shared/src/version.ts
28436
28440
  function compareVersions(v1, v2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.30",
3
+ "version": "0.3.32",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {