fix
This commit is contained in:
parent
c65fd58279
commit
fbe95baf7e
1 changed files with 3 additions and 6 deletions
|
|
@ -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."),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue