genbox 1.0.222 → 1.0.223
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.
|
@@ -256,21 +256,27 @@ function displaySessions(result, options = {}) {
|
|
|
256
256
|
const localCloudIds = new Set(sessions.filter(s => s.type === 'cloud').map(s => s.infrastructure?.genboxId));
|
|
257
257
|
const additionalCloudSessions = cloudGenboxes
|
|
258
258
|
.filter(g => !localCloudIds.has(g.id))
|
|
259
|
-
.map(g =>
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
259
|
+
.map(g => {
|
|
260
|
+
// Get the first URL from the urls map (usually 'app' or the first service)
|
|
261
|
+
const urlValues = g.urls ? Object.values(g.urls) : [];
|
|
262
|
+
const previewUrl = urlValues.length > 0 ? urlValues[0] : undefined;
|
|
263
|
+
return {
|
|
264
|
+
id: g.id,
|
|
265
|
+
name: g.name,
|
|
266
|
+
type: 'cloud',
|
|
267
|
+
provider: 'claude',
|
|
268
|
+
status: (g.status === 'running' ? 'running' : 'stopped'),
|
|
269
|
+
projectPath: g.projectPath || '',
|
|
270
|
+
createdAt: g.createdAt,
|
|
271
|
+
syncEnabled: true,
|
|
272
|
+
previewUrl,
|
|
273
|
+
infrastructure: {
|
|
274
|
+
genboxId: g.id,
|
|
275
|
+
genboxName: g.name,
|
|
276
|
+
ipAddress: g.ipAddress,
|
|
277
|
+
},
|
|
278
|
+
};
|
|
279
|
+
});
|
|
274
280
|
const allSessions = [...sessions, ...additionalCloudSessions];
|
|
275
281
|
// Separate into local and cloud
|
|
276
282
|
const localTypes = ['native', 'docker', 'multipass', 'genbox'];
|
|
@@ -302,11 +308,9 @@ function displaySessions(result, options = {}) {
|
|
|
302
308
|
console.log(chalk_1.default.dim(' ' + '─'.repeat(70)));
|
|
303
309
|
for (const session of cloudSessions) {
|
|
304
310
|
console.log(formatItem(session));
|
|
305
|
-
// Show URL
|
|
306
|
-
|
|
307
|
-
(
|
|
308
|
-
if (previewUrl) {
|
|
309
|
-
console.log(chalk_1.default.dim(` └─ ${previewUrl}`));
|
|
311
|
+
// Show URL (from API-provided urls, no fallback to avoid incorrect URLs)
|
|
312
|
+
if (session.previewUrl) {
|
|
313
|
+
console.log(chalk_1.default.dim(` └─ ${session.previewUrl}`));
|
|
310
314
|
}
|
|
311
315
|
// Show AI sessions running on this cloud genbox
|
|
312
316
|
const genboxName = session.infrastructure?.genboxName || session.name;
|