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
- id: g.id,
261
- name: g.name,
262
- type: 'cloud',
263
- provider: 'claude',
264
- status: (g.status === 'running' ? 'running' : 'stopped'),
265
- projectPath: g.projectPath || '',
266
- createdAt: g.createdAt,
267
- syncEnabled: true,
268
- infrastructure: {
269
- genboxId: g.id,
270
- genboxName: g.name,
271
- ipAddress: g.ipAddress,
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
- const previewUrl = session.previewUrl ||
307
- (session.infrastructure?.ipAddress ? `https://${session.infrastructure.genboxName || session.name}.genbox.dev` : null);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.222",
3
+ "version": "1.0.223",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {