codeam-cli 1.4.34 → 1.4.35

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.js +10 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -116,7 +116,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
116
116
  // package.json
117
117
  var package_default = {
118
118
  name: "codeam-cli",
119
- version: "1.4.34",
119
+ version: "1.4.35",
120
120
  description: "Remote control Claude Code from your mobile device",
121
121
  main: "dist/index.js",
122
122
  bin: {
@@ -1387,13 +1387,13 @@ function post(endpoint, body) {
1387
1387
  },
1388
1388
  (res) => {
1389
1389
  res.resume();
1390
- resolve();
1390
+ resolve(res.statusCode !== void 0 && res.statusCode >= 200 && res.statusCode < 300);
1391
1391
  }
1392
1392
  );
1393
- req.on("error", () => resolve());
1393
+ req.on("error", () => resolve(false));
1394
1394
  req.on("timeout", () => {
1395
1395
  req.destroy();
1396
- resolve();
1396
+ resolve(false);
1397
1397
  });
1398
1398
  req.write(payload);
1399
1399
  req.end();
@@ -1678,13 +1678,12 @@ var HistoryService = class {
1678
1678
  const totalBatches = Math.ceil(messages.length / CONVERSATION_BATCH_SIZE);
1679
1679
  for (let i = 0; i < totalBatches; i++) {
1680
1680
  const batch = messages.slice(i * CONVERSATION_BATCH_SIZE, (i + 1) * CONVERSATION_BATCH_SIZE);
1681
- await post("/api/sessions/claude-conversation", {
1682
- pluginId: this.pluginId,
1683
- sessionId,
1684
- messages: batch,
1685
- batchIndex: i,
1686
- totalBatches
1687
- });
1681
+ const body = { pluginId: this.pluginId, sessionId, messages: batch, batchIndex: i, totalBatches };
1682
+ const ok = await post("/api/sessions/claude-conversation", body);
1683
+ if (!ok) {
1684
+ await new Promise((r) => setTimeout(r, 1e3));
1685
+ await post("/api/sessions/claude-conversation", body);
1686
+ }
1688
1687
  }
1689
1688
  }
1690
1689
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "1.4.34",
3
+ "version": "1.4.35",
4
4
  "description": "Remote control Claude Code from your mobile device",
5
5
  "main": "dist/index.js",
6
6
  "bin": {