From fbe95baf7e82e4ea432caf0857f21fc86f453d68 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 14 Aug 2025 22:12:23 -0700 Subject: [PATCH] fix --- src/commands/remote.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/commands/remote.ts b/src/commands/remote.ts index 7515087d7..ac73b3699 100644 --- a/src/commands/remote.ts +++ b/src/commands/remote.ts @@ -1,10 +1,6 @@ import chalk from "chalk"; -import { - getAccessToken, - isAuthenticatedConfig, - loadAuthConfig, -} from "../auth/workos.js"; +import { getAccessToken, loadAuthConfig } from "../auth/workos.js"; import { env } from "../env.js"; import { telemetryService } from "../telemetry/telemetryService.js"; import { startRemoteTUIChat } from "../ui/index.js"; @@ -50,7 +46,8 @@ export async function remote( try { const authConfig = loadAuthConfig(); - if (!isAuthenticatedConfig(authConfig)) { + // Check if we have any valid authentication (file-based or environment variable) + if (!authConfig || !getAccessToken(authConfig)) { console.error( chalk.red("Not authenticated. Please run 'cn login' first."), );