claude-code-remote-pilot 0.2.3 → 0.2.4

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/bin/claude-pilot.js +13 -14
  2. package/package.json +1 -1
@@ -120,11 +120,6 @@ function renderTable(sessions) {
120
120
  // ─── watch mode ───────────────────────────────────────────────────────────────
121
121
 
122
122
  function startWatch(manager, rl) {
123
- rl.removeAllListeners('close');
124
- rl.close();
125
- if (process.stdin.isTTY) process.stdin.setRawMode(true);
126
- process.stdin.resume();
127
-
128
123
  function draw() {
129
124
  process.stdout.write('\x1B[2J\x1B[0f');
130
125
  process.stdout.write(renderTable(manager.list()));
@@ -133,18 +128,22 @@ function startWatch(manager, rl) {
133
128
  draw();
134
129
  const interval = setInterval(draw, 2000);
135
130
 
136
- function onData(buf) {
137
- const key = buf.toString();
138
- if (key === 'q' || key === 'Q' || buf[0] === 3) {
139
- clearInterval(interval);
140
- process.stdin.removeListener('data', onData);
141
- if (process.stdin.isTTY) process.stdin.setRawMode(false);
142
- process.stdout.write('\x1B[2J\x1B[0f');
143
- startREPL(manager);
131
+ function exit() {
132
+ process.stdin.removeListener('keypress', onKeypress);
133
+ clearInterval(interval);
134
+ process.stdout.write('\x1B[2J\x1B[0f');
135
+ // Clear any character readline buffered while we were in watch mode
136
+ rl.write(null, { ctrl: true, name: 'u' });
137
+ rl.prompt();
138
+ }
139
+
140
+ function onKeypress(str, key) {
141
+ if (str === 'q' || str === 'Q' || (key && key.ctrl && key.name === 'c')) {
142
+ exit();
144
143
  }
145
144
  }
146
145
 
147
- process.stdin.on('data', onData);
146
+ process.stdin.on('keypress', onKeypress);
148
147
  }
149
148
 
150
149
  // ─── REPL ─────────────────────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-remote-pilot",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Interactive Claude Code supervisor — spawn and monitor multiple Claude sessions from a single terminal.",
5
5
  "type": "commonjs",
6
6
  "bin": {