replicas-cli 0.2.52 → 0.2.54

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.
@@ -7871,11 +7871,25 @@ function parseClaudeEvents(events, parentToolUseId) {
7871
7871
  const action = toolName === "Write" ? "add" : "update";
7872
7872
  let diff;
7873
7873
  if (toolName === "Edit" && inputObj.old_string != null && inputObj.new_string != null) {
7874
- const oldLines = inputObj.old_string.replace(/\n$/, "").split("\n").map((l) => `-${l}`);
7875
- const newLines = inputObj.new_string.replace(/\n$/, "").split("\n").map((l) => `+${l}`);
7876
- diff = [...oldLines, ...newLines].join("\n");
7874
+ const oldLines = inputObj.old_string.replace(/\n$/, "").split("\n");
7875
+ const newLines = inputObj.new_string.replace(/\n$/, "").split("\n");
7876
+ const hunk = `@@ -1,${oldLines.length} +1,${newLines.length} @@`;
7877
+ diff = [
7878
+ `--- a/${filePath}`,
7879
+ `+++ b/${filePath}`,
7880
+ hunk,
7881
+ ...oldLines.map((l) => `-${l}`),
7882
+ ...newLines.map((l) => `+${l}`)
7883
+ ].join("\n");
7877
7884
  } else if (toolName === "Write" && inputObj.content != null) {
7878
- diff = inputObj.content.replace(/\n$/, "").split("\n").map((l) => `+${l}`).join("\n");
7885
+ const newLines = inputObj.content.replace(/\n$/, "").split("\n");
7886
+ const hunk = `@@ -0,0 +1,${newLines.length} @@`;
7887
+ diff = [
7888
+ `--- /dev/null`,
7889
+ `+++ b/${filePath}`,
7890
+ hunk,
7891
+ ...newLines.map((l) => `+${l}`)
7892
+ ].join("\n");
7879
7893
  }
7880
7894
  messages.push({
7881
7895
  id: `patch-${event.timestamp}-${messages.length}`,
package/dist/index.mjs CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  setIdeCommand,
16
16
  setOrganizationId,
17
17
  writeConfig
18
- } from "./chunk-QIZFFIVG.mjs";
18
+ } from "./chunk-SDULF4LX.mjs";
19
19
 
20
20
  // src/index.ts
21
21
  import "dotenv/config";
@@ -1855,12 +1855,12 @@ async function interactiveCommand() {
1855
1855
  );
1856
1856
  }
1857
1857
  console.log(chalk17.gray("Starting interactive mode..."));
1858
- const { launchInteractive } = await import("./interactive-N5J5JUYL.mjs");
1858
+ const { launchInteractive } = await import("./interactive-PU7VBDB2.mjs");
1859
1859
  await launchInteractive();
1860
1860
  }
1861
1861
 
1862
1862
  // src/index.ts
1863
- var CLI_VERSION = "0.2.52";
1863
+ var CLI_VERSION = "0.2.54";
1864
1864
  var program = new Command();
1865
1865
  program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
1866
1866
  program.command("login").description("Authenticate with your Replicas account").action(async () => {