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.
- package/bin/claude-pilot.js +13 -14
- package/package.json +1 -1
package/bin/claude-pilot.js
CHANGED
|
@@ -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
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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('
|
|
146
|
+
process.stdin.on('keypress', onKeypress);
|
|
148
147
|
}
|
|
149
148
|
|
|
150
149
|
// ─── REPL ─────────────────────────────────────────────────────────────────────
|
package/package.json
CHANGED