codeam-cli 1.4.47 → 1.4.49

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 +29 -9
  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.47",
119
+ version: "1.4.49",
120
120
  description: "Remote control Claude Code from your mobile device",
121
121
  main: "dist/index.js",
122
122
  bin: {
@@ -909,7 +909,7 @@ function isChromeLine(line) {
909
909
  if (SPINNER_RE.test(t)) return true;
910
910
  if (BULLET_TOOL_RE.test(t)) return true;
911
911
  if (TREE_LINE_RE.test(t)) return true;
912
- if (STATUS_LINE_RE.test(t) && /\d+\s*s\s*[·•]|\bthought\s+for\b|\d+\s*tokens/i.test(t)) return true;
912
+ if (STATUS_LINE_RE.test(t) && /\d+\s*s\s*[·•]|\bthought\s+for\b|\d+\s*tokens|\(thinking\)/i.test(t)) return true;
913
913
  if (/esc.{0,5}to.{0,5}interrupt/i.test(t)) return true;
914
914
  if (/high\s*[·•]\s*\/effort/i.test(t)) return true;
915
915
  if (/^[❯>]\s*$/.test(t)) return true;
@@ -931,12 +931,17 @@ function parseChromeLine(line) {
931
931
  if (/^[❯>]\s*$/.test(t)) return null;
932
932
  if (t.replace(/\s/g, "").length === 1) return null;
933
933
  if ((t.match(/─/g)?.length ?? 0) >= 6) return null;
934
+ if (/esc.{0,5}to.{0,5}interrupt/i.test(t)) return null;
935
+ if (/high\s*[·•]\s*\/effort/i.test(t)) return null;
936
+ if (/↑\s*\/?\s*↓\s*to\s*navigate/i.test(t)) return null;
937
+ if (/ctrl\+?o\s+to\s+expand/i.test(t)) return null;
938
+ if (/spending limit|usage limit/i.test(t)) return null;
934
939
  if (/^\(thinking\)\s*$/.test(t)) {
935
940
  return { tool: "thinking", label: "Thinking\u2026", status: "running" };
936
941
  }
937
942
  if (TREE_LINE_RE.test(t)) return null;
938
- if (STATUS_LINE_RE.test(t) && /\d+\s*s\s*[·•]|\bthought\s+for\b|\d+\s*tokens/i.test(t)) {
939
- const label = t.slice(2).replace(/\s*\(\d+s.*\)$/, "").replace(/…$/, "").trim() || "Thinking\u2026";
943
+ if (STATUS_LINE_RE.test(t) && /\d+\s*s\s*[·•]|\bthought\s+for\b|\d+\s*tokens|\(thinking\)/i.test(t)) {
944
+ const label = t.slice(2).replace(/\s*\(\d+s.*\)$/, "").replace(/\s*\(thinking\)\s*$/i, "").replace(/…$/, "").trim() || "Thinking\u2026";
940
945
  return { tool: "thinking", label, status: "running" };
941
946
  }
942
947
  let text = t;
@@ -1212,7 +1217,7 @@ function filterChrome(lines) {
1212
1217
  ))
1213
1218
  continue;
1214
1219
  if (/^└\s/.test(t)) continue;
1215
- if (/^\+\s/.test(t) && /\d+\s*s\s*[·•]|\bthought\s+for\b|\d+\s*tokens/i.test(t)) continue;
1220
+ if (/^\+\s/.test(t) && /\d+\s*s\s*[·•]|\bthought\s+for\b|\d+\s*tokens|\(thinking\)/i.test(t)) continue;
1216
1221
  const stripped = t.replace(/^[│╭╰╮╯┌└┐┘├┤┬┴┼]\s?/, "");
1217
1222
  if (/^[❯>]\s+\S/.test(stripped) && !/^[❯>]\s*\d+\./.test(stripped)) {
1218
1223
  skipEchoContinuation = true;
@@ -1237,6 +1242,7 @@ var OutputService = class _OutputService {
1237
1242
  rawBuffer = "";
1238
1243
  lastSentContent = "";
1239
1244
  lastSentChromeStepsJson = "";
1245
+ chromeStepsHistory = [];
1240
1246
  pollTimer = null;
1241
1247
  startTime = 0;
1242
1248
  active = false;
@@ -1272,6 +1278,7 @@ var OutputService = class _OutputService {
1272
1278
  this.rawBuffer = "";
1273
1279
  this.lastSentContent = "";
1274
1280
  this.lastSentChromeStepsJson = "";
1281
+ this.chromeStepsHistory = [];
1275
1282
  this.lastPushTime = 0;
1276
1283
  this.active = true;
1277
1284
  this.startTime = Date.now();
@@ -1287,6 +1294,7 @@ var OutputService = class _OutputService {
1287
1294
  this.rawBuffer = "";
1288
1295
  this.lastSentContent = "";
1289
1296
  this.lastSentChromeStepsJson = "";
1297
+ this.chromeStepsHistory = [];
1290
1298
  this.lastPushTime = 0;
1291
1299
  this.active = true;
1292
1300
  this.terminalTurnPending = false;
@@ -1305,6 +1313,7 @@ var OutputService = class _OutputService {
1305
1313
  this.rawBuffer = "";
1306
1314
  this.lastSentContent = "";
1307
1315
  this.lastSentChromeStepsJson = "";
1316
+ this.chromeStepsHistory = [];
1308
1317
  this.lastPushTime = 0;
1309
1318
  this.active = true;
1310
1319
  this.startTime = Date.now();
@@ -1419,12 +1428,23 @@ var OutputService = class _OutputService {
1419
1428
  }
1420
1429
  }
1421
1430
  postChromeSteps(lines) {
1422
- const steps = lines.filter((l) => isChromeLine(l)).map((l) => parseChromeLine(l)).filter((s) => s !== null);
1423
- if (steps.length === 0) return;
1424
- const json = JSON.stringify(steps);
1431
+ const visible = lines.filter((l) => isChromeLine(l)).map((l) => parseChromeLine(l)).filter((s) => s !== null);
1432
+ if (visible.length === 0) return;
1433
+ let changed = false;
1434
+ for (const step of visible) {
1435
+ const exists = this.chromeStepsHistory.some(
1436
+ (s) => s.tool === step.tool && s.label === step.label
1437
+ );
1438
+ if (!exists) {
1439
+ this.chromeStepsHistory.push(step);
1440
+ changed = true;
1441
+ }
1442
+ }
1443
+ if (!changed) return;
1444
+ const json = JSON.stringify(this.chromeStepsHistory);
1425
1445
  if (json === this.lastSentChromeStepsJson) return;
1426
1446
  this.lastSentChromeStepsJson = json;
1427
- this.postChunk({ type: "chrome_steps", content: "", steps }).catch(() => {
1447
+ this.postChunk({ type: "chrome_steps", content: "", steps: [...this.chromeStepsHistory] }).catch(() => {
1428
1448
  });
1429
1449
  }
1430
1450
  postChunk(body) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "1.4.47",
3
+ "version": "1.4.49",
4
4
  "description": "Remote control Claude Code from your mobile device",
5
5
  "main": "dist/index.js",
6
6
  "bin": {