From c3aa9b693b0afd5c2b23233d4ae45bc751d68c3e Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 14 Aug 2025 22:01:05 -0700 Subject: [PATCH] fix: tests --- src/commands/remote.ts | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/commands/remote.ts b/src/commands/remote.ts index bfbf7560a..7515087d7 100644 --- a/src/commands/remote.ts +++ b/src/commands/remote.ts @@ -17,6 +17,19 @@ export async function remote( ) { // If --url is provided, connect directly to that URL if (options.url) { + if (options.start) { + // In start mode, output connection details as JSON and exit + console.log( + JSON.stringify({ + status: "success", + message: "Remote environment connection details", + url: options.url, + mode: "direct_url", + }), + ); + return; + } + console.info( chalk.white(`Connecting to remote environment at: ${options.url}`), ); @@ -72,15 +85,15 @@ export async function remote( const result = await response.json(); if (options.start) { - // In print mode, output connection details as JSON and exit + // In start mode, output connection details as JSON and exit console.log( JSON.stringify({ status: "success", message: "Remote development environment created successfully", - url: `${env.appUrl}/agents/${result.id}`, + url: result.url, + port: result.port, name: requestBody.name, - containerUrl: result.url, - containerPort: result.port, + mode: "new_environment", }), ); return;