codeam-cli 1.1.4 → 1.1.6

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 +7 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -110,7 +110,7 @@ var import_picocolors = __toESM(require("picocolors"));
110
110
  // package.json
111
111
  var package_default = {
112
112
  name: "codeam-cli",
113
- version: "1.1.4",
113
+ version: "1.1.6",
114
114
  description: "Remote control Claude Code from your mobile device",
115
115
  main: "dist/index.js",
116
116
  bin: {
@@ -841,8 +841,8 @@ function renderToLines(raw) {
841
841
  return screen;
842
842
  }
843
843
  function detectSelector(raw) {
844
+ if (!/\x1B\[\d*A/.test(raw)) return null;
844
845
  const stripped = raw.replace(/\x1B\[[^@-~]*[@-~]/g, "").replace(/\x1B\][^\x07\x1B]*(?:\x07|\x1B\\)/g, "").replace(/\x1B[@-Z\\-_]/g, "");
845
- if (!/Enter to select/i.test(stripped)) return null;
846
846
  const segments = stripped.split(/[\r\n]+/);
847
847
  const optionMap = /* @__PURE__ */ new Map();
848
848
  for (const seg of segments) {
@@ -854,12 +854,13 @@ function detectSelector(raw) {
854
854
  if (!optionMap.has(num)) optionMap.set(num, m[2].trim());
855
855
  }
856
856
  }
857
- const options = [...optionMap.entries()].sort(([a], [b]) => a - b).map(([, label]) => label);
858
- if (options.length === 0) return null;
857
+ const keys = [...optionMap.keys()].sort((a, b) => a - b);
858
+ if (keys.length < 2 || keys[0] !== 1) return null;
859
+ const options = keys.map((k) => optionMap.get(k));
859
860
  let question = "";
860
861
  for (let i = segments.length - 1; i >= 0; i--) {
861
862
  const t = segments[i].trim();
862
- if (t.endsWith("?") && !/Enter to select/i.test(t) && !/^[❯>]?\s*\d+\./.test(t)) {
863
+ if (t.endsWith("?") && !/^[❯>]?\s*\d+\./.test(t)) {
863
864
  question = t;
864
865
  break;
865
866
  }
@@ -879,8 +880,7 @@ function filterChrome(lines) {
879
880
  if (/^\(thinking\)\s*$/.test(t)) return false;
880
881
  if (/^\?\s.*shortcut/i.test(t)) return false;
881
882
  if (/spending limit|usage limit/i.test(t) && t.length < 80) return false;
882
- if (/Enter to select/i.test(t)) return false;
883
- if (/↑\s*\/\s*↓\s*to\s*navigate/i.test(t)) return false;
883
+ if (/↑\s*\/?\s*↓\s*to\s*navigate/i.test(t)) return false;
884
884
  return true;
885
885
  });
886
886
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Remote control Claude Code from your mobile device",
5
5
  "main": "dist/index.js",
6
6
  "bin": {