codeam-cli 2.4.32 → 2.4.33

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 +19 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1482,7 +1482,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
1482
1482
  // package.json
1483
1483
  var package_default = {
1484
1484
  name: "codeam-cli",
1485
- version: "2.4.32",
1485
+ version: "2.4.33",
1486
1486
  description: "Remote control Claude Code (and other AI coding agents) from your mobile phone. Pair your device, send prompts, stream responses in real-time, and approve commands \u2014 from anywhere.",
1487
1487
  main: "dist/index.js",
1488
1488
  bin: {
@@ -2293,6 +2293,7 @@ var WindowsConPtyStrategy = class _WindowsConPtyStrategy {
2293
2293
  dataSub = null;
2294
2294
  exitSub = null;
2295
2295
  rawModeSet = false;
2296
+ resizeHandler = null;
2296
2297
  /**
2297
2298
  * Factory that returns a working ConPTY strategy or `null` if
2298
2299
  * node-pty can't load. The caller (claude.service.ts) decides
@@ -2304,10 +2305,12 @@ var WindowsConPtyStrategy = class _WindowsConPtyStrategy {
2304
2305
  return new _WindowsConPtyStrategy(opts, lib);
2305
2306
  }
2306
2307
  spawn(cmd, cwd, args2 = []) {
2308
+ const cols = process.stdout.columns && process.stdout.columns > 0 ? process.stdout.columns : 120;
2309
+ const rows = process.stdout.rows && process.stdout.rows > 0 ? process.stdout.rows : 30;
2307
2310
  this.pty = this.lib.spawn(cmd, args2, {
2308
2311
  name: "xterm-256color",
2309
- cols: 220,
2310
- rows: 50,
2312
+ cols,
2313
+ rows,
2311
2314
  cwd,
2312
2315
  env: {
2313
2316
  ...process.env,
@@ -2334,6 +2337,15 @@ var WindowsConPtyStrategy = class _WindowsConPtyStrategy {
2334
2337
  }
2335
2338
  process.stdin.resume();
2336
2339
  process.stdin.on("data", this.stdinHandler);
2340
+ this.resizeHandler = () => {
2341
+ const c2 = process.stdout.columns && process.stdout.columns > 0 ? process.stdout.columns : cols;
2342
+ const r = process.stdout.rows && process.stdout.rows > 0 ? process.stdout.rows : rows;
2343
+ try {
2344
+ this.pty?.resize(c2, r);
2345
+ } catch {
2346
+ }
2347
+ };
2348
+ process.stdout.on("resize", this.resizeHandler);
2337
2349
  }
2338
2350
  write(data) {
2339
2351
  if (!this.pty) return;
@@ -2352,6 +2364,10 @@ var WindowsConPtyStrategy = class _WindowsConPtyStrategy {
2352
2364
  this.dataSub = null;
2353
2365
  this.exitSub = null;
2354
2366
  process.stdin.removeListener("data", this.stdinHandler);
2367
+ if (this.resizeHandler) {
2368
+ process.stdout.removeListener("resize", this.resizeHandler);
2369
+ this.resizeHandler = null;
2370
+ }
2355
2371
  if (this.rawModeSet && process.stdin.isTTY) {
2356
2372
  try {
2357
2373
  process.stdin.setRawMode(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.4.32",
3
+ "version": "2.4.33",
4
4
  "description": "Remote control Claude Code (and other AI coding agents) from your mobile phone. Pair your device, send prompts, stream responses in real-time, and approve commands — from anywhere.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {