codeam-cli 1.4.38 → 1.4.40

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 +27 -3
  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.38",
119
+ version: "1.4.40",
120
120
  description: "Remote control Claude Code from your mobile device",
121
121
  main: "dist/index.js",
122
122
  bin: {
@@ -815,9 +815,22 @@ var ClaudeService = class {
815
815
  const claudeCmd = findInPath("claude") ? "claude" : "claude-code";
816
816
  this.strategy.spawn(claudeCmd, this.opts.cwd);
817
817
  }
818
- /** Send a command to Claude's stdin (remote control from mobile). */
818
+ /**
819
+ * Send a command to Claude's stdin (remote control from mobile).
820
+ *
821
+ * Why two separate writes with a delay?
822
+ * Same batching problem as selectOption: all bytes arriving in one write()
823
+ * call are processed by readline in one synchronous run. React Ink batches
824
+ * the resulting state updates, so when '\r' fires the input's value is still
825
+ * the pre-batch (empty/previous) state → Enter submits nothing and the text
826
+ * stays visible-but-unsubmitted in the input field.
827
+ *
828
+ * Sending '\r' in a separate write() 50 ms later guarantees it arrives on
829
+ * a fresh event-loop tick, after React has flushed the text into input state.
830
+ */
819
831
  sendCommand(text) {
820
- this.strategy.write(text + "\r");
832
+ this.strategy.write(text);
833
+ setTimeout(() => this.strategy.write("\r"), 50);
821
834
  }
822
835
  /**
823
836
  * Navigate a React Ink selector to the given 0-based target index and confirm.
@@ -1116,6 +1129,9 @@ function filterChrome(lines) {
1116
1129
  if (/^\?\s.*shortcut/i.test(t)) continue;
1117
1130
  if (/spending limit|usage limit/i.test(t) && t.length < 80) continue;
1118
1131
  if (/↑\s*\/?\s*↓\s*to\s*navigate/i.test(t)) continue;
1132
+ if (t.replace(/\s/g, "").length === 1) continue;
1133
+ if ((t.match(/─/g)?.length ?? 0) >= 6) continue;
1134
+ if (/ctrl\+?o\s+to\s+expand/i.test(t)) continue;
1119
1135
  const stripped = t.replace(/^[│╭╰╮╯┌└┐┘├┤┬┴┼]\s?/, "");
1120
1136
  if (/^[❯>]\s+\S/.test(stripped) && !/^[❯>]\s*\d+\./.test(stripped)) {
1121
1137
  skipEchoContinuation = true;
@@ -1474,6 +1490,9 @@ var HistoryService = class {
1474
1490
  setCurrentConversationId(id) {
1475
1491
  this.currentConversationId = id;
1476
1492
  }
1493
+ getCurrentConversationId() {
1494
+ return this.currentConversationId;
1495
+ }
1477
1496
  /** Detect the active conversation by finding the most recently modified JSONL file */
1478
1497
  detectCurrentConversation() {
1479
1498
  const dir = this.projectDir;
@@ -1986,6 +2005,11 @@ except Exception:sys.exit(0)
1986
2005
  historySvc.detectCurrentConversation();
1987
2006
  historySvc.load().catch(() => {
1988
2007
  });
2008
+ const currentId = historySvc.getCurrentConversationId();
2009
+ if (currentId) {
2010
+ historySvc.loadConversation(currentId).catch(() => {
2011
+ });
2012
+ }
1989
2013
  }, 2e3);
1990
2014
  setTimeout(() => {
1991
2015
  fetchQuotaUsage();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "1.4.38",
3
+ "version": "1.4.40",
4
4
  "description": "Remote control Claude Code from your mobile device",
5
5
  "main": "dist/index.js",
6
6
  "bin": {