From 3ce7bb06dc448777175c33b162c009dc20b8a3fd Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 21 Jul 2025 15:26:18 -0700 Subject: [PATCH] fix: remote url no port --- .vscode/launch.json | 3 +++ src/commands/remote.ts | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index ee45c6d58..fd7277a69 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,6 +9,9 @@ "args": [], "env": { "NODE_ENV": "development" + // "CONTINUE_API_BASE": "http://localhost:3001/", + // "WORKOS_CLIENT_ID": "client_01J0FW6XCPMJMQ3CG51RB4HBZQ", + // "HUB_URL": "http://localhost:3000" }, "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", diff --git a/src/commands/remote.ts b/src/commands/remote.ts index e82063fce..e95c912c0 100644 --- a/src/commands/remote.ts +++ b/src/commands/remote.ts @@ -5,15 +5,20 @@ import { loadAuthConfig, } from "../auth/workos.js"; import { env } from "../env.js"; -import { startRemoteTUIChat } from "../ui/index.js"; import telemetryService from "../telemetry/telemetryService.js"; +import { startRemoteTUIChat } from "../ui/index.js"; import logger from "../util/logger.js"; -export async function remote(prompt: string | undefined, options: { url?: string } = {}) { +export async function remote( + prompt: string | undefined, + options: { url?: string } = {} +) { // If --url is provided, connect directly to that URL if (options.url) { - console.info(chalk.white(`Connecting to remote environment at: ${options.url}`)); - + console.info( + chalk.white(`Connecting to remote environment at: ${options.url}`) + ); + // Record session start telemetryService.recordSessionStart(); telemetryService.startActiveTime(); @@ -69,7 +74,7 @@ export async function remote(prompt: string | undefined, options: { url?: string ); if (result.url && result.port) { - const remoteUrl = `${result.url}:${result.port}`; + const remoteUrl = result.url; console.info( chalk.white(`Connecting to remote environment at: ${remoteUrl}`) ); @@ -85,7 +90,9 @@ export async function remote(prompt: string | undefined, options: { url?: string telemetryService.stopActiveTime(); } } else { - throw new Error("No URL or port returned from remote environment creation"); + throw new Error( + "No URL or port returned from remote environment creation" + ); } } catch (error: any) { logger.error( @@ -93,4 +100,4 @@ export async function remote(prompt: string | undefined, options: { url?: string ); process.exit(1); } -} \ No newline at end of file +}