fix: remote url no port
This commit is contained in:
parent
9cb2455e38
commit
3ce7bb06dc
2 changed files with 17 additions and 7 deletions
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue