claude-code-remote-pilot 0.5.9 → 0.5.10
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 -4
- package/package.json +1 -1
package/bin/claude-pilot.js
CHANGED
|
@@ -154,7 +154,7 @@ function buildAllSessions(manager) {
|
|
|
154
154
|
return [...active, ...offline];
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
function renderWatchTable(allSessions, selectedIdx) {
|
|
157
|
+
function renderWatchTable(allSessions, selectedIdx, webServer = null) {
|
|
158
158
|
const NW = 18, SW = 14, UW = 7, TW = 16;
|
|
159
159
|
const bar = ' ' + '─'.repeat(NW + SW + UW + TW + 10);
|
|
160
160
|
const header = ` ${'#'.padEnd(3)}${'SESSION'.padEnd(NW)} ${'STATUS'.padEnd(SW)} ${'UP'.padEnd(UW)} ${'USAGE / RESET'.padEnd(TW)}`;
|
|
@@ -181,7 +181,16 @@ function renderWatchTable(allSessions, selectedIdx) {
|
|
|
181
181
|
footer = ` [1-${Math.min(allSessions.length, 9)}]: select session w: web ui q: exit watch`;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
const lines = ['\n', ' Claude Code Remote Pilot'];
|
|
185
|
+
if (webServer) {
|
|
186
|
+
if (webServer._tunnelUrl) {
|
|
187
|
+
lines.push(` ${C.blue}Tunnel${C.reset}: ${webServer._tunnelUrl} ${C.dim}local: http://127.0.0.1:${webServer.port}${C.reset}`);
|
|
188
|
+
} else {
|
|
189
|
+
lines.push(` ${C.dim}Web UI: http://${webServer.host}:${webServer.port}${C.reset}`);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
lines.push(bar, header, bar, ...rows, bar, footer, '');
|
|
193
|
+
return lines.join('\n');
|
|
185
194
|
}
|
|
186
195
|
|
|
187
196
|
function startWatch(manager, rl) {
|
|
@@ -192,7 +201,7 @@ function startWatch(manager, rl) {
|
|
|
192
201
|
function draw() {
|
|
193
202
|
allSessions = buildAllSessions(manager);
|
|
194
203
|
process.stdout.write('\x1B[2J\x1B[0f');
|
|
195
|
-
process.stdout.write(renderWatchTable(allSessions, selectedIdx));
|
|
204
|
+
process.stdout.write(renderWatchTable(allSessions, selectedIdx, manager._webServer));
|
|
196
205
|
}
|
|
197
206
|
|
|
198
207
|
function startTimer() {
|
|
@@ -214,7 +223,7 @@ function startWatch(manager, rl) {
|
|
|
214
223
|
|
|
215
224
|
function redraw() {
|
|
216
225
|
process.stdout.write('\x1B[2J\x1B[0f');
|
|
217
|
-
process.stdout.write(renderWatchTable(allSessions, selectedIdx));
|
|
226
|
+
process.stdout.write(renderWatchTable(allSessions, selectedIdx, manager._webServer));
|
|
218
227
|
}
|
|
219
228
|
|
|
220
229
|
function onKeypress(str, key) {
|
package/package.json
CHANGED