copilotkit 0.0.47 → 0.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -196,7 +196,7 @@ var AuthService = class {
196
196
  }
197
197
  if (shouldLogin) {
198
198
  if (context === "cloud-features") {
199
- cmd.log(chalk.cyan("\n\u{1F680} Setting up Copilot Cloud authentication for your selected features...\n"));
199
+ cmd.log(chalk.cyan("\n\u{1F680} Setting up Copilot Cloud authentication...\n"));
200
200
  }
201
201
  const loginResult = await this.login({ exitAfterLogin: false });
202
202
  cliToken = loginResult.cliToken;
@@ -216,8 +216,14 @@ var AuthService = class {
216
216
  try {
217
217
  me = await trpcClient2.me.query();
218
218
  } catch (error) {
219
- cmd.log(chalk.red("Could not authenticate with Copilot Cloud. Please run: npx copilotkit@latest login"));
220
- process.exit(1);
219
+ cmd.log(chalk.yellow("Your authentication has expired. Re-authenticating..."));
220
+ try {
221
+ const loginResult = await this.login({ exitAfterLogin: false });
222
+ return loginResult;
223
+ } catch (loginError) {
224
+ cmd.log(chalk.red("Could not authenticate with Copilot Cloud. Please run: npx copilotkit@latest login"));
225
+ process.exit(1);
226
+ }
221
227
  }
222
228
  if (!me.organization || !me.user) {
223
229
  cmd.error("Authentication required to proceed.");
@@ -278,7 +284,7 @@ import { Command } from "@oclif/core";
278
284
  import Sentry, { consoleIntegration } from "@sentry/node";
279
285
 
280
286
  // src/utils/version.ts
281
- var LIB_VERSION = "0.0.47";
287
+ var LIB_VERSION = "0.0.48";
282
288
 
283
289
  // src/commands/base-command.ts
284
290
  import chalk2 from "chalk";