replicas-cli 0.3.525 → 0.3.528

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 +14 -9
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -38450,6 +38450,7 @@ function extractToolResult(event) {
38450
38450
  toolUseId: toolResult.tool_use_id,
38451
38451
  output: output3,
38452
38452
  outputOmitted: toolResult.replicasOmitted,
38453
+ images: contentImages(normalizeContentBlocks(toolResult.content)),
38453
38454
  exitCode: exitCode === void 0 ? void 0 : parseInt(exitCode, 10),
38454
38455
  status: toolResult.is_error ? "failed" : "completed"
38455
38456
  };
@@ -38480,16 +38481,19 @@ function readClaudeUserPrompt(payload, content) {
38480
38481
  if (payload.isSynthetic || content.some((c) => c.type === "tool_result" && c.tool_use_id)) return void 0;
38481
38482
  const text4 = content.filter((c) => c.type === "text").map((c) => c.text || "").join("\n");
38482
38483
  if (LOCAL_COMMAND_ECHO_REGEX.test(text4.trim())) return void 0;
38483
- const images = content.filter((c) => c.type === "image" && c.source).map((c) => {
38484
- const source = c.source;
38485
- return {
38484
+ const images = contentImages(content);
38485
+ return text4 || images.length > 0 ? { text: text4, images } : void 0;
38486
+ }
38487
+ function contentImages(content) {
38488
+ return content.flatMap((c) => {
38489
+ if (c.type !== "image" || !c.source || !c.source.data && !c.replicasOmitted) return [];
38490
+ return [{
38486
38491
  type: "image",
38487
- mediaType: source.media_type || "image/png",
38488
- data: source.data || "",
38492
+ mediaType: c.source.media_type || "image/png",
38493
+ data: c.source.data || "",
38489
38494
  ...c.replicasOmitted ? { replicasOmitted: c.replicasOmitted } : {}
38490
- };
38491
- }).filter((img) => img.data || img.replicasOmitted);
38492
- return text4 || images.length > 0 ? { text: text4, images } : void 0;
38495
+ }];
38496
+ });
38493
38497
  }
38494
38498
  function parseClaudeEvents(events, parentToolUseId) {
38495
38499
  const messages = [];
@@ -38973,6 +38977,7 @@ function parseClaudeEvents(events, parentToolUseId) {
38973
38977
  } else if (message2.type === "tool_call") {
38974
38978
  message2.output = resultContent;
38975
38979
  message2.outputOmitted = outputOmitted;
38980
+ if (result.images.length > 0) message2.images = result.images;
38976
38981
  message2.status = status;
38977
38982
  } else if (message2.type === "skill" && isError && message2.path) {
38978
38983
  replaceMessage(toolInfo.messageIndex, { id: message2.id, type: "tool_call", server: "claude", tool: toolInfo.toolName, input: toolInfo.input, output: resultContent, outputOmitted, status, timestamp: message2.timestamp });
@@ -40292,7 +40297,7 @@ var CLI_VERSION;
40292
40297
  var init_cli_version = __esm({
40293
40298
  "../shared/src/cli-version.ts"() {
40294
40299
  "use strict";
40295
- CLI_VERSION = "0.3.525";
40300
+ CLI_VERSION = "0.3.528";
40296
40301
  }
40297
40302
  });
40298
40303
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.525",
3
+ "version": "0.3.528",
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": {