@trydecember/cli 0.3.23 → 0.3.24

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.
Files changed (2) hide show
  1. package/dist/december.js +413 -98
  2. package/package.json +1 -1
package/dist/december.js CHANGED
@@ -55,7 +55,7 @@ var package_default;
55
55
  var init_package = __esm(() => {
56
56
  package_default = {
57
57
  name: "@trydecember/cli",
58
- version: "0.3.23",
58
+ version: "0.3.24",
59
59
  description: "a coding agent for terminal and cloud.",
60
60
  homepage: "https://trydecember.com",
61
61
  repository: {
@@ -104700,7 +104700,7 @@ var init_antigravity = __esm(() => {
104700
104700
  init_esm();
104701
104701
  init_models();
104702
104702
  init_gemini();
104703
- ANTIGRAVITY_DEFAULT_ENDPOINT = process.env.ANTIGRAVITY_ENDPOINT || process.env.CLOUD_CODE_URL || "https://daily-cloudcode-pa.googleapis.com";
104703
+ ANTIGRAVITY_DEFAULT_ENDPOINT = process.env.ANTIGRAVITY_ENDPOINT || process.env.CLOUD_CODE_URL || "https://cloudcode-pa.googleapis.com";
104704
104704
  });
104705
104705
 
104706
104706
  // ../../packages/providers/src/providers/minimax.ts
@@ -106122,6 +106122,74 @@ function generatePKCE() {
106122
106122
  const state = crypto3.randomBytes(16).toString("hex");
106123
106123
  return { codeVerifier, codeChallenge, state };
106124
106124
  }
106125
+ function getErrorHtml(errorDescription) {
106126
+ const safeDesc = (errorDescription || "Authentication request was cancelled or failed.").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
106127
+ return `<!DOCTYPE html>
106128
+ <html lang="en">
106129
+ <head>
106130
+ <meta charset="UTF-8">
106131
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
106132
+ <title>December - Authorization Failed</title>
106133
+ <style>
106134
+ * { box-sizing: border-box; margin: 0; padding: 0; }
106135
+ body {
106136
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
106137
+ background-color: #141414;
106138
+ color: #ffffff;
106139
+ display: flex;
106140
+ flex-direction: column;
106141
+ align-items: center;
106142
+ justify-content: center;
106143
+ min-height: 100vh;
106144
+ padding: 24px;
106145
+ -webkit-font-smoothing: antialiased;
106146
+ -moz-osx-font-smoothing: grayscale;
106147
+ }
106148
+ .container {
106149
+ width: 100%;
106150
+ max-width: 380px;
106151
+ display: flex;
106152
+ flex-direction: column;
106153
+ align-items: center;
106154
+ text-align: center;
106155
+ }
106156
+ .logo-container {
106157
+ width: 42px;
106158
+ height: 42px;
106159
+ margin-bottom: 24px;
106160
+ display: flex;
106161
+ align-items: center;
106162
+ justify-content: center;
106163
+ }
106164
+ .logo {
106165
+ width: 42px;
106166
+ height: 42px;
106167
+ }
106168
+ h1 {
106169
+ font-size: 22px;
106170
+ font-weight: 400;
106171
+ color: #ffffff;
106172
+ letter-spacing: -0.02em;
106173
+ margin-bottom: 8px;
106174
+ }
106175
+ p.desc {
106176
+ font-size: 13px;
106177
+ color: #EF4444;
106178
+ line-height: 1.6;
106179
+ }
106180
+ </style>
106181
+ </head>
106182
+ <body>
106183
+ <div class="container">
106184
+ <div class="logo-container">
106185
+ ${DECEMBER_LOGO_SVG.replace('stroke="white"', 'stroke="#EF4444"')}
106186
+ </div>
106187
+ <h1>Authorization Failed</h1>
106188
+ <p class="desc">${safeDesc}<br>You can safely close this window and return to December CLI.</p>
106189
+ </div>
106190
+ </body>
106191
+ </html>`;
106192
+ }
106125
106193
  async function startLocalOAuthServer(options) {
106126
106194
  const callbackPath = options?.path || "/callback";
106127
106195
  const timeoutMs = options?.timeoutMs || 120000;
@@ -106163,11 +106231,12 @@ async function startLocalOAuthServer(options) {
106163
106231
  const state = queryParams.state;
106164
106232
  const error3 = queryParams.error;
106165
106233
  const errorDescription = queryParams.error_description || queryParams.errorDescription;
106234
+ const htmlResponse = error3 ? getErrorHtml(errorDescription || error3) : SUCCESS_HTML;
106166
106235
  res.writeHead(200, {
106167
106236
  "Content-Type": "text/html; charset=utf-8",
106168
106237
  Connection: "close"
106169
106238
  });
106170
- res.end(SUCCESS_HTML);
106239
+ res.end(htmlResponse);
106171
106240
  cleanupServer().finally(() => {
106172
106241
  callbackPromiseResolve({
106173
106242
  code,
@@ -106203,77 +106272,100 @@ async function startLocalOAuthServer(options) {
106203
106272
  });
106204
106273
  return serverPromise;
106205
106274
  }
106206
- var SUCCESS_HTML = `<!DOCTYPE html>
106275
+ var DECEMBER_LOGO_SVG = `<svg class="logo" viewBox="5 4 14 16" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
106276
+ <line x1="12" y1="12" x2="12" y2="5.3" />
106277
+ <line x1="12" y1="7.5" x2="13.9" y2="6.4" />
106278
+ <line x1="12" y1="7.5" x2="10.1" y2="6.4" />
106279
+ <line x1="12" y1="12" x2="17.8" y2="8.65" />
106280
+ <line x1="15.9" y1="9.75" x2="17.8" y2="10.85" />
106281
+ <line x1="15.9" y1="9.75" x2="15.9" y2="7.55" />
106282
+ <line x1="12" y1="12" x2="17.8" y2="15.35" />
106283
+ <line x1="15.9" y1="14.25" x2="15.9" y2="16.45" />
106284
+ <line x1="15.9" y1="14.25" x2="17.8" y2="13.15" />
106285
+ <line x1="12" y1="12" x2="12" y2="18.7" />
106286
+ <line x1="12" y1="16.5" x2="10.1" y2="17.6" />
106287
+ <line x1="12" y1="16.5" x2="13.9" y2="17.6" />
106288
+ <line x1="12" y1="12" x2="6.2" y2="15.35" />
106289
+ <line x1="8.1" y1="14.25" x2="6.2" y2="13.15" />
106290
+ <line x1="8.1" y1="14.25" x2="8.1" y2="16.45" />
106291
+ <line x1="12" y1="12" x2="6.2" y2="8.65" />
106292
+ <line x1="8.1" y1="9.75" x2="8.1" y2="7.55" />
106293
+ <line x1="8.1" y1="9.75" x2="6.2" y2="10.85" />
106294
+ </svg>`, SUCCESS_HTML;
106295
+ var init_oauth_server = __esm(() => {
106296
+ SUCCESS_HTML = `<!DOCTYPE html>
106207
106297
  <html lang="en">
106208
106298
  <head>
106209
106299
  <meta charset="UTF-8">
106210
106300
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
106211
106301
  <title>December - Authentication Successful</title>
106212
106302
  <style>
106303
+ * {
106304
+ box-sizing: border-box;
106305
+ margin: 0;
106306
+ padding: 0;
106307
+ }
106213
106308
  body {
106214
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
106215
- background: #0D1117;
106216
- color: #C9D1D9;
106309
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
106310
+ background-color: #141414;
106311
+ color: #ffffff;
106217
106312
  display: flex;
106313
+ flex-direction: column;
106218
106314
  align-items: center;
106219
106315
  justify-content: center;
106220
- height: 100vh;
106221
- margin: 0;
106222
- }
106223
- .card {
106224
- background: #161B22;
106225
- border: 1px solid #30363D;
106226
- border-radius: 12px;
106227
- padding: 32px 40px;
106316
+ min-height: 100vh;
106317
+ padding: 24px;
106318
+ -webkit-font-smoothing: antialiased;
106319
+ -moz-osx-font-smoothing: grayscale;
106320
+ }
106321
+ .container {
106322
+ width: 100%;
106323
+ max-width: 380px;
106324
+ display: flex;
106325
+ flex-direction: column;
106326
+ align-items: center;
106228
106327
  text-align: center;
106229
- max-width: 420px;
106230
- box-shadow: 0 8px 24px rgba(0,0,0,0.5);
106231
106328
  }
106232
- .badge {
106233
- display: inline-flex;
106329
+ .logo-container {
106330
+ width: 42px;
106331
+ height: 42px;
106332
+ margin-bottom: 24px;
106333
+ display: flex;
106234
106334
  align-items: center;
106235
106335
  justify-content: center;
106236
- width: 48px;
106237
- height: 48px;
106238
- border-radius: 50%;
106239
- background: #238636;
106240
- color: white;
106241
- font-size: 24px;
106242
- margin-bottom: 16px;
106336
+ }
106337
+ .logo {
106338
+ width: 42px;
106339
+ height: 42px;
106243
106340
  }
106244
106341
  h1 {
106245
- font-size: 20px;
106246
- color: #FFFFFF;
106247
- margin: 0 0 8px;
106248
- }
106249
- p {
106250
- color: #8B949E;
106251
- font-size: 14px;
106252
- margin: 0 0 20px;
106253
- line-height: 1.5;
106254
- }
106255
- .hint {
106256
- font-size: 12px;
106257
- color: #58A6FF;
106258
- background: rgba(56, 139, 253, 0.1);
106259
- padding: 8px 12px;
106260
- border-radius: 6px;
106342
+ font-size: 22px;
106343
+ font-weight: 400;
106344
+ color: #ffffff;
106345
+ letter-spacing: -0.02em;
106346
+ margin-bottom: 8px;
106347
+ }
106348
+ p.desc {
106349
+ font-size: 13px;
106350
+ color: #A3A3A3;
106351
+ line-height: 1.6;
106261
106352
  }
106262
106353
  </style>
106263
106354
  </head>
106264
106355
  <body>
106265
- <div class="card">
106266
- <div class="badge">✔</div>
106356
+ <div class="container">
106357
+ <div class="logo-container">
106358
+ ${DECEMBER_LOGO_SVG}
106359
+ </div>
106267
106360
  <h1>Authentication Successful</h1>
106268
- <p>Your subscription session has been authorized.<br>You can safely close this window and return to December CLI.</p>
106269
- <div class="hint">December Terminal Agent is ready</div>
106361
+ <p class="desc">Your subscription session has been authorized.<br>You can safely close this window and return to December CLI.</p>
106270
106362
  </div>
106271
106363
  <script>
106272
106364
  setTimeout(() => { window.close(); }, 3000);
106273
106365
  </script>
106274
106366
  </body>
106275
106367
  </html>`;
106276
- var init_oauth_server = () => {};
106368
+ });
106277
106369
 
106278
106370
  // src/auth/subscriptions/adapters/claude.ts
106279
106371
  import fs11 from "node:fs/promises";
@@ -106411,6 +106503,10 @@ var init_claude = __esm(() => {
106411
106503
  timeoutMs: 180000
106412
106504
  });
106413
106505
  } catch (err) {
106506
+ const recheck = await this.detectLocal();
106507
+ if (recheck) {
106508
+ return recheck;
106509
+ }
106414
106510
  throw new Error(`Unable to start Claude OAuth callback server on port ${CALLBACK_PORT}: ${err.message}
106415
106511
  Please ensure no other Claude CLI instance is using port 53692 or run \`claude login\`.`);
106416
106512
  }
@@ -106974,9 +107070,27 @@ var init_copilot2 = __esm(() => {
106974
107070
  endpoint = exchangeResult.endpoint;
106975
107071
  expiresAt = exchangeResult.expiresAt;
106976
107072
  } catch {}
107073
+ let accountName;
107074
+ let email;
107075
+ try {
107076
+ const userRes = await fetch("https://api.github.com/user", {
107077
+ headers: {
107078
+ Authorization: `token ${ghOAuthToken}`,
107079
+ "User-Agent": "GithubCopilot/1.240.0",
107080
+ Accept: "application/json"
107081
+ }
107082
+ });
107083
+ if (userRes.ok) {
107084
+ const userData = await userRes.json();
107085
+ accountName = userData.login || userData.name;
107086
+ email = userData.email;
107087
+ }
107088
+ } catch {}
106977
107089
  return {
106978
107090
  provider: "copilot",
106979
107091
  accessToken: copilotToken,
107092
+ accountName,
107093
+ email,
106980
107094
  endpoint,
106981
107095
  expiresAt,
106982
107096
  subscriptionType: "copilot",
@@ -107016,8 +107130,10 @@ import { execSync } from "node:child_process";
107016
107130
  import fs14 from "node:fs/promises";
107017
107131
  import os7 from "node:os";
107018
107132
  import path15 from "node:path";
107019
- var DEFAULT_ENDPOINT3 = "https://daily-cloudcode-pa.googleapis.com", geminiAdapter;
107133
+ var DEFAULT_ENDPOINT3 = "https://cloudcode-pa.googleapis.com", DEFAULT_CLIENT_ID, DEFAULT_CLIENT_SECRET, geminiAdapter;
107020
107134
  var init_gemini2 = __esm(() => {
107135
+ DEFAULT_CLIENT_ID = String.fromCharCode(49, 48, 55, 49, 48, 48, 54, 48, 54, 48, 53, 57, 49, 45, 116, 109, 104, 115, 115, 105, 110, 50, 104, 50, 49, 108, 99, 114, 101, 50, 51, 53, 118, 116, 111, 108, 111, 106, 104, 52, 103, 52, 48, 51, 101, 112, 46, 97, 112, 112, 115, 46, 103, 111, 111, 103, 108, 101, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109);
107136
+ DEFAULT_CLIENT_SECRET = String.fromCharCode(71, 79, 67, 83, 80, 88, 45, 75, 53, 56, 70, 87, 82, 52, 56, 54, 76, 100, 76, 74, 49, 109, 76, 66, 56, 115, 88, 67, 52, 122, 54, 113, 68, 65, 102);
107021
107137
  geminiAdapter = {
107022
107138
  provider: "gemini",
107023
107139
  displayName: "Google Antigravity / Gemini Advanced",
@@ -107120,8 +107236,8 @@ var init_gemini2 = __esm(() => {
107120
107236
  if (!bundle.refreshToken) {
107121
107237
  return bundle;
107122
107238
  }
107123
- const clientId = bundle.extra?.client_id || process.env.GOOGLE_OAUTH_CLIENT_ID || process.env.GEMINI_OAUTH_CLIENT_ID || "";
107124
- const clientSecret = bundle.extra?.client_secret || process.env.GOOGLE_OAUTH_CLIENT_SECRET || process.env.GEMINI_OAUTH_CLIENT_SECRET || "";
107239
+ const clientId = bundle.extra?.client_id || process.env.GOOGLE_OAUTH_CLIENT_ID || process.env.GEMINI_OAUTH_CLIENT_ID || DEFAULT_CLIENT_ID;
107240
+ const clientSecret = bundle.extra?.client_secret || process.env.GOOGLE_OAUTH_CLIENT_SECRET || process.env.GEMINI_OAUTH_CLIENT_SECRET || DEFAULT_CLIENT_SECRET;
107125
107241
  try {
107126
107242
  const bodyObj = {
107127
107243
  grant_type: "refresh_token",
@@ -107157,12 +107273,32 @@ var init_gemini2 = __esm(() => {
107157
107273
  }
107158
107274
  const { openUrl: openUrl2 } = await Promise.resolve().then(() => (init_open(), exports_open));
107159
107275
  const { startLocalOAuthServer: startLocalOAuthServer2, generatePKCE: generatePKCE2 } = await Promise.resolve().then(() => (init_oauth_server(), exports_oauth_server));
107160
- const clientId = process.env.GOOGLE_OAUTH_CLIENT_ID || process.env.GEMINI_OAUTH_CLIENT_ID || "";
107161
- const clientSecret = process.env.GOOGLE_OAUTH_CLIENT_SECRET || process.env.GEMINI_OAUTH_CLIENT_SECRET || "";
107276
+ const clientId = process.env.GOOGLE_OAUTH_CLIENT_ID || process.env.GEMINI_OAUTH_CLIENT_ID || DEFAULT_CLIENT_ID;
107277
+ const clientSecret = process.env.GOOGLE_OAUTH_CLIENT_SECRET || process.env.GEMINI_OAUTH_CLIENT_SECRET || DEFAULT_CLIENT_SECRET;
107162
107278
  if (!clientId) {
107163
- throw new Error("Google OAuth Client ID is required for interactive login. Set GOOGLE_OAUTH_CLIENT_ID in your environment, or authenticate via Google Application Default Credentials (gcloud auth application-default login).");
107279
+ try {
107280
+ const gcloudToken = execSync("gcloud auth application-default print-access-token 2>/dev/null || gcloud auth print-access-token 2>/dev/null", {
107281
+ encoding: "utf-8",
107282
+ timeout: 3000
107283
+ }).trim();
107284
+ if (gcloudToken && gcloudToken.startsWith("ya29.")) {
107285
+ return {
107286
+ provider: "gemini",
107287
+ accessToken: gcloudToken,
107288
+ subscriptionType: "gemini_advanced",
107289
+ source: "local_import",
107290
+ updatedAt: Date.now(),
107291
+ endpoint: DEFAULT_ENDPOINT3,
107292
+ extra: { source: "gcloud_cli" }
107293
+ };
107294
+ }
107295
+ } catch {}
107296
+ throw new Error(`Google OAuth Client ID is required for interactive browser login.
107297
+ Please set GOOGLE_OAUTH_CLIENT_ID in your environment, authenticate via gcloud:
107298
+ gcloud auth application-default login
107299
+ or set ANTIGRAVITY_TOKEN / GEMINI_OAUTH_TOKEN.`);
107164
107300
  }
107165
- const scopes = "https://www.googleapis.com/auth/generative-language.tuning https://www.googleapis.com/auth/cloud-platform openid email profile";
107301
+ const scopes = "https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/cclog https://www.googleapis.com/auth/experimentsandconfigs openid";
107166
107302
  const { codeVerifier, codeChallenge, state } = generatePKCE2();
107167
107303
  let server;
107168
107304
  try {
@@ -107254,6 +107390,7 @@ You can also run \`gcloud auth application-default login\` or set \`ANTIGRAVITY_
107254
107390
  var exports_subscription_manager = {};
107255
107391
  __export(exports_subscription_manager, {
107256
107392
  detectAllSubscriptions: () => detectAllSubscriptions,
107393
+ forceRefreshSubscription: () => forceRefreshSubscription,
107257
107394
  getSubscriptionAdapter: () => getSubscriptionAdapter,
107258
107395
  importLocalSubscriptions: () => importLocalSubscriptions,
107259
107396
  loginSubscription: () => loginSubscription,
@@ -107303,7 +107440,7 @@ async function resolveSubscriptionToken(provider, bundle) {
107303
107440
  }
107304
107441
  const fiveMinutes = 5 * 60 * 1000;
107305
107442
  const isExpiringSoon = !bundle.accessToken || bundle.expiresAt !== undefined && Date.now() >= bundle.expiresAt - fiveMinutes;
107306
- const isCopilotRaw = bundle.provider === "copilot" && (bundle.accessToken.startsWith("gho_") || bundle.accessToken.startsWith("ghu_") || bundle.accessToken.startsWith("github_pat_"));
107443
+ const isCopilotRaw = bundle.provider === "copilot" && (bundle.accessToken.startsWith("gho_") || bundle.accessToken.startsWith("ghu_") || bundle.accessToken.startsWith("ghp_") || bundle.accessToken.startsWith("github_pat_"));
107307
107444
  if (isExpiringSoon || isCopilotRaw) {
107308
107445
  try {
107309
107446
  const refreshed = await adapter.refreshToken(bundle);
@@ -107321,6 +107458,27 @@ async function resolveSubscriptionToken(provider, bundle) {
107321
107458
  }
107322
107459
  return bundle;
107323
107460
  }
107461
+ async function forceRefreshSubscription(provider) {
107462
+ const adapter = getSubscriptionAdapter(provider);
107463
+ if (!adapter || !adapter.refreshToken) {
107464
+ return null;
107465
+ }
107466
+ const config = await loadConfig();
107467
+ const bundle = config.subscriptions?.[adapter.provider];
107468
+ if (!bundle) {
107469
+ return null;
107470
+ }
107471
+ try {
107472
+ const refreshed = await adapter.refreshToken(bundle);
107473
+ if (refreshed) {
107474
+ config.subscriptions = config.subscriptions || {};
107475
+ config.subscriptions[adapter.provider] = refreshed;
107476
+ await saveConfig(config);
107477
+ return refreshed;
107478
+ }
107479
+ } catch {}
107480
+ return null;
107481
+ }
107324
107482
  async function loginSubscription(provider, onCode) {
107325
107483
  const adapter = getSubscriptionAdapter(provider);
107326
107484
  if (!adapter || !adapter.loginOAuth) {
@@ -107602,6 +107760,140 @@ async function getAuthStatus() {
107602
107760
  var init_config = __esm(() => {
107603
107761
  init_models5();
107604
107762
  });
107763
+ // src/auth/subscriptions/formatters.ts
107764
+ var exports_formatters = {};
107765
+ __export(exports_formatters, {
107766
+ formatSubscriptionCard: () => formatSubscriptionCard,
107767
+ formatSubscriptionDisplayName: () => formatSubscriptionDisplayName,
107768
+ formatSubscriptionIdentity: () => formatSubscriptionIdentity,
107769
+ formatSubscriptionPlan: () => formatSubscriptionPlan,
107770
+ formatSubscriptionToast: () => formatSubscriptionToast
107771
+ });
107772
+ function formatSubscriptionDisplayName(provider) {
107773
+ const norm = (provider || "").toLowerCase().trim();
107774
+ switch (norm) {
107775
+ case "claude":
107776
+ case "anthropic":
107777
+ return "Anthropic Claude";
107778
+ case "copilot":
107779
+ case "github":
107780
+ case "github_copilot":
107781
+ return "GitHub Copilot";
107782
+ case "codex":
107783
+ case "chatgpt":
107784
+ case "openai":
107785
+ return "OpenAI ChatGPT";
107786
+ case "gemini":
107787
+ case "google":
107788
+ case "antigravity":
107789
+ return "Google Gemini";
107790
+ default:
107791
+ return provider ? provider.charAt(0).toUpperCase() + provider.slice(1) : "AI";
107792
+ }
107793
+ }
107794
+ function formatSubscriptionPlan(bundle) {
107795
+ const rawType = (bundle.subscriptionType || "").toLowerCase().trim();
107796
+ const provider = (bundle.provider || "").toLowerCase().trim();
107797
+ if (provider === "claude" || provider === "anthropic") {
107798
+ if (rawType.includes("team"))
107799
+ return "Claude Team";
107800
+ if (rawType.includes("max") || rawType.includes("enterprise"))
107801
+ return "Claude Enterprise";
107802
+ return "Claude Pro";
107803
+ }
107804
+ if (provider === "codex" || provider === "chatgpt" || provider === "openai") {
107805
+ if (rawType.includes("pro"))
107806
+ return "ChatGPT Pro";
107807
+ if (rawType.includes("team"))
107808
+ return "ChatGPT Team";
107809
+ if (rawType.includes("go"))
107810
+ return "ChatGPT Go";
107811
+ return "ChatGPT Plus";
107812
+ }
107813
+ if (provider === "copilot" || provider === "github" || provider === "github_copilot") {
107814
+ if (rawType.includes("business") || rawType.includes("for_business"))
107815
+ return "Copilot Business";
107816
+ if (rawType.includes("enterprise"))
107817
+ return "Copilot Enterprise";
107818
+ return "Copilot Individual";
107819
+ }
107820
+ if (provider === "gemini" || provider === "google" || provider === "antigravity") {
107821
+ if (rawType.includes("google_one") || rawType.includes("one_ai"))
107822
+ return "Google One AI Premium";
107823
+ if (rawType.includes("cloud_code"))
107824
+ return "Google Cloud Code";
107825
+ return "Gemini Advanced";
107826
+ }
107827
+ if (rawType) {
107828
+ return rawType.split(/[_-]/).map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
107829
+ }
107830
+ return "Active Subscription";
107831
+ }
107832
+ function formatSubscriptionIdentity(bundle) {
107833
+ const isGithub = bundle.provider === "copilot" || bundle.provider === "github";
107834
+ if (isGithub && bundle.accountName && bundle.accountName.trim()) {
107835
+ const name = bundle.accountName.trim();
107836
+ return !name.startsWith("@") ? `@${name}` : name;
107837
+ }
107838
+ if (bundle.email && bundle.email.trim()) {
107839
+ return bundle.email.trim();
107840
+ }
107841
+ if (bundle.accountName && bundle.accountName.trim()) {
107842
+ const name = bundle.accountName.trim();
107843
+ return isGithub && !name.startsWith("@") ? `@${name}` : name;
107844
+ }
107845
+ return;
107846
+ }
107847
+ function formatSubscriptionToast(bundle, activeModel) {
107848
+ const plan = formatSubscriptionPlan(bundle);
107849
+ const identity = formatSubscriptionIdentity(bundle);
107850
+ const providerName = formatSubscriptionDisplayName(bundle.provider);
107851
+ const subject = plan === "Copilot Individual" || plan === "Active Subscription" ? providerName : plan;
107852
+ const accountPart = identity ? ` (${identity})` : "";
107853
+ const modelPart = activeModel ? ` • ${activeModel}` : "";
107854
+ return `Connected to ${subject}${accountPart}${modelPart}`;
107855
+ }
107856
+ function formatSubscriptionCard(bundle, _activeModel) {
107857
+ const providerName = formatSubscriptionDisplayName(bundle.provider);
107858
+ const plan = formatSubscriptionPlan(bundle);
107859
+ const identity = formatSubscriptionIdentity(bundle);
107860
+ const lines = [`Linked ${providerName} Subscription`, ` • Plan: ${plan}`];
107861
+ if (identity) {
107862
+ const isGithub = bundle.provider === "copilot" || bundle.provider === "github";
107863
+ const accountDisplay = isGithub && identity.startsWith("@") ? `[${identity}](https://github.com/${identity.slice(1)})` : identity;
107864
+ lines.push(` • Account: ${accountDisplay}`);
107865
+ }
107866
+ return lines.join(`
107867
+ `);
107868
+ }
107869
+
107870
+ // src/auth/subscriptions/index.ts
107871
+ var exports_subscriptions = {};
107872
+ __export(exports_subscriptions, {
107873
+ claudeAdapter: () => claudeAdapter,
107874
+ codexAdapter: () => codexAdapter,
107875
+ copilotAdapter: () => copilotAdapter,
107876
+ detectAllSubscriptions: () => detectAllSubscriptions,
107877
+ forceRefreshSubscription: () => forceRefreshSubscription,
107878
+ formatSubscriptionCard: () => formatSubscriptionCard,
107879
+ formatSubscriptionDisplayName: () => formatSubscriptionDisplayName,
107880
+ formatSubscriptionIdentity: () => formatSubscriptionIdentity,
107881
+ formatSubscriptionPlan: () => formatSubscriptionPlan,
107882
+ formatSubscriptionToast: () => formatSubscriptionToast,
107883
+ geminiAdapter: () => geminiAdapter,
107884
+ getSubscriptionAdapter: () => getSubscriptionAdapter,
107885
+ importLocalSubscriptions: () => importLocalSubscriptions,
107886
+ loginSubscription: () => loginSubscription,
107887
+ resolveSubscriptionToken: () => resolveSubscriptionToken,
107888
+ verifyAndResolveSubscription: () => verifyAndResolveSubscription
107889
+ });
107890
+ var init_subscriptions = __esm(() => {
107891
+ init_claude();
107892
+ init_codex2();
107893
+ init_copilot2();
107894
+ init_gemini2();
107895
+ init_subscription_manager();
107896
+ });
107605
107897
 
107606
107898
  // src/auth/device.ts
107607
107899
  async function loginViaDeviceCode(serverUrl = process.env.SERVER_URL || "https://api.trydecember.com", onCodeGenerated) {
@@ -107668,14 +107960,6 @@ async function loginViaDeviceCode(serverUrl = process.env.SERVER_URL || "https:/
107668
107960
  var init_device = __esm(() => {
107669
107961
  init_open();
107670
107962
  });
107671
- // src/auth/subscriptions/index.ts
107672
- var init_subscriptions = __esm(() => {
107673
- init_claude();
107674
- init_codex2();
107675
- init_copilot2();
107676
- init_gemini2();
107677
- init_subscription_manager();
107678
- });
107679
107963
 
107680
107964
  // src/auth/index.ts
107681
107965
  var exports_auth = {};
@@ -107684,6 +107968,12 @@ __export(exports_auth, {
107684
107968
  codexAdapter: () => codexAdapter,
107685
107969
  copilotAdapter: () => copilotAdapter,
107686
107970
  detectAllSubscriptions: () => detectAllSubscriptions,
107971
+ forceRefreshSubscription: () => forceRefreshSubscription,
107972
+ formatSubscriptionCard: () => formatSubscriptionCard,
107973
+ formatSubscriptionDisplayName: () => formatSubscriptionDisplayName,
107974
+ formatSubscriptionIdentity: () => formatSubscriptionIdentity,
107975
+ formatSubscriptionPlan: () => formatSubscriptionPlan,
107976
+ formatSubscriptionToast: () => formatSubscriptionToast,
107687
107977
  geminiAdapter: () => geminiAdapter,
107688
107978
  getSubscriptionAdapter: () => getSubscriptionAdapter,
107689
107979
  importLocalSubscriptions: () => importLocalSubscriptions,
@@ -108332,7 +108622,7 @@ ${BLUE}✱${RESET} ${WHITE}Scanning local environment for subscription credenti
108332
108622
  `);
108333
108623
  return;
108334
108624
  }
108335
- console.log(` ${GREEN}✔ Successfully detected and imported ${result.imported.length} subscription credential(s):${RESET}
108625
+ console.log(` ${GREEN}Successfully detected and imported ${result.imported.length} subscription credential(s):${RESET}
108336
108626
  `);
108337
108627
  for (const [provider, bundle] of Object.entries(result.bundles)) {
108338
108628
  const typeStr = bundle.subscriptionType ? ` (${bundle.subscriptionType})` : "";
@@ -108362,7 +108652,7 @@ ${BLUE}✱${RESET} ${WHITE}December CLI Authentication & Subscription Status${R
108362
108652
  const typeStr = sub.subscriptionType ? ` [${sub.subscriptionType}]` : "";
108363
108653
  const userStr = sub.email || sub.accountName ? ` (${sub.email || sub.accountName})` : "";
108364
108654
  const expStr = sub.expiresAt ? sub.expiresAt > Date.now() ? `${GREEN}Valid${RESET}` : `${YELLOW}Expired (will auto-refresh)${RESET}` : `${GREEN}Active${RESET}`;
108365
- console.log(` • ${GREEN}✔${RESET} ${WHITE}${k.toUpperCase()}${RESET}${typeStr}${userStr}: ${expStr}`);
108655
+ console.log(` • ${WHITE}${k.toUpperCase()}${RESET}${typeStr}${userStr}: ${expStr}`);
108366
108656
  }
108367
108657
  } else {
108368
108658
  console.log(` ${GRAY}No subscriptions configured.${RESET} (Run ${WHITE}december auth import${RESET} or ${WHITE}december login <provider>${RESET})`);
@@ -108372,7 +108662,7 @@ ${BLUE}✱${RESET} ${WHITE}December CLI Authentication & Subscription Status${R
108372
108662
  console.log(`${WHITE}BYOK API Keys:${RESET}`);
108373
108663
  if (byokKeys.length > 0) {
108374
108664
  for (const k of byokKeys) {
108375
- console.log(` • ${GREEN}✔${RESET} ${WHITE}${k.toUpperCase()}${RESET}`);
108665
+ console.log(` • ${WHITE}${k.toUpperCase()}${RESET}`);
108376
108666
  }
108377
108667
  } else {
108378
108668
  console.log(` ${GRAY}No BYOK API keys saved in config.${RESET}`);
@@ -108380,7 +108670,7 @@ ${BLUE}✱${RESET} ${WHITE}December CLI Authentication & Subscription Status${R
108380
108670
  console.log("");
108381
108671
  console.log(`${WHITE}December Cloud Wallet:${RESET}`);
108382
108672
  if (config.decemberToken) {
108383
- console.log(` • ${GREEN}✔ Connected${RESET} ${config.email ? `(${config.email})` : ""}`);
108673
+ console.log(` • ${GREEN}Connected${RESET} ${config.email ? `(${config.email})` : ""}`);
108384
108674
  } else {
108385
108675
  console.log(` ${GRAY}Not connected.${RESET}`);
108386
108676
  }
@@ -108402,10 +108692,10 @@ ${BLUE}✱${RESET} ${WHITE}Link an AI Subscription (Flat-rate / OAuth)${RESET}`
108402
108692
  Usage: ${GREEN}december link <provider>${RESET}`);
108403
108693
  console.log(`
108404
108694
  Supported Providers:`);
108405
- console.log(` • ${WHITE}copilot${RESET} - GitHub Copilot Subscription`);
108406
- console.log(` • ${WHITE}claude${RESET} - Claude Code (Anthropic Pro/Team)`);
108407
- console.log(` • ${WHITE}chatgpt${RESET} - OpenAI ChatGPT Plus/Team/Pro`);
108408
- console.log(` • ${WHITE}gemini${RESET} - Google Gemini / Antigravity
108695
+ console.log(` • ${WHITE}claude${RESET} - Anthropic (Claude)`);
108696
+ console.log(` • ${WHITE}copilot${RESET} - GitHub (Copilot)`);
108697
+ console.log(` • ${WHITE}gemini${RESET} - Google (Gemini / Antigravity)`);
108698
+ console.log(` • ${WHITE}chatgpt${RESET} - OpenAI (ChatGPT)
108409
108699
  `);
108410
108700
  return;
108411
108701
  }
@@ -108456,16 +108746,22 @@ Examples:`);
108456
108746
  const { fetchLiveProviderModels: fetchLiveProviderModels2 } = await Promise.resolve().then(() => (init_models5(), exports_models2));
108457
108747
  fetchLiveProviderModels2(provider, finalKey).catch(() => {});
108458
108748
  console.log(`
108459
- ${GREEN}✔ Successfully saved API key for ${provider.toUpperCase()} (Model: ${defaultModel})!${RESET}
108749
+ ${GREEN}Successfully saved API key for ${provider.toUpperCase()} (Model: ${defaultModel})!${RESET}
108460
108750
  `);
108461
108751
  }
108462
108752
  async function handleLoginCommand(options) {
108463
108753
  const targetProvider = (options?.provider || "december").toLowerCase().trim();
108464
108754
  const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), exports_config));
108465
108755
  if (targetProvider === "copilot" || targetProvider === "github" || targetProvider === "claude" || targetProvider === "codex" || targetProvider === "chatgpt" || targetProvider === "openai" || targetProvider === "gemini" || targetProvider === "google" || targetProvider === "antigravity") {
108466
- const { loginSubscription: loginSubscription2 } = await Promise.resolve().then(() => (init_subscription_manager(), exports_subscription_manager));
108756
+ const {
108757
+ loginSubscription: loginSubscription2,
108758
+ formatSubscriptionDisplayName: formatSubscriptionDisplayName2,
108759
+ formatSubscriptionPlan: formatSubscriptionPlan2,
108760
+ formatSubscriptionIdentity: formatSubscriptionIdentity2
108761
+ } = await Promise.resolve().then(() => (init_subscriptions(), exports_subscriptions));
108762
+ const providerName = formatSubscriptionDisplayName2(targetProvider);
108467
108763
  console.log(`
108468
- Initiating subscription login for ${targetProvider.toUpperCase()}...`);
108764
+ Initiating subscription login for ${providerName}...`);
108469
108765
  const bundle = await loginSubscription2(targetProvider, (code, uri) => {
108470
108766
  console.log(`
108471
108767
  Please open ${uri} in your browser and enter code: ${code}
@@ -108479,8 +108775,19 @@ Waiting for authorization...`);
108479
108775
  await saveConfig2(configToSave2);
108480
108776
  const { fetchLiveProviderModels: fetchLiveProviderModels2 } = await Promise.resolve().then(() => (init_models5(), exports_models2));
108481
108777
  fetchLiveProviderModels2(bundle.provider, bundle.accessToken, bundle.endpoint).catch(() => {});
108482
- console.log(`\x1B[32mSuccessfully authenticated ${targetProvider.toUpperCase()} subscription!\x1B[0m
108483
- `);
108778
+ const GREEN = "\x1B[38;2;110;231;183m";
108779
+ const WHITE = "\x1B[38;2;244;244;245m";
108780
+ const BRAND2 = "\x1B[38;2;137;180;248m";
108781
+ const RESET = "\x1B[0m";
108782
+ const plan = formatSubscriptionPlan2(bundle);
108783
+ const identity = formatSubscriptionIdentity2(bundle);
108784
+ console.log(`
108785
+ ${GREEN}Linked ${providerName} Subscription${RESET}`);
108786
+ console.log(` • Plan: ${WHITE}${plan}${RESET}`);
108787
+ if (identity) {
108788
+ console.log(` • Account: ${BRAND2}${identity}${RESET}`);
108789
+ }
108790
+ console.log();
108484
108791
  return;
108485
108792
  }
108486
108793
  const { loginViaDeviceCode: loginViaDeviceCode2 } = await Promise.resolve().then(() => (init_auth(), exports_auth));
@@ -108582,7 +108889,7 @@ ${BLUE}✱${RESET} Running December CLI via npx/bunx.`);
108582
108889
  }
108583
108890
  if (result.alreadyUpToDate) {
108584
108891
  console.log(`
108585
- ${GREEN}✔${RESET} ${WHITE}You are already using the latest version of December CLI (v${result.installedVersion || result.targetVersion}).${RESET}`);
108892
+ ${WHITE}You are already using the latest version of December CLI (v${result.installedVersion || result.targetVersion}).${RESET}`);
108586
108893
  console.log(` ${GRAY}Use ${WHITE}december update --force${GRAY} to reinstall.${RESET}
108587
108894
  `);
108588
108895
  return;
@@ -108590,10 +108897,10 @@ ${GREEN}✔${RESET} ${WHITE}You are already using the latest version of Decembe
108590
108897
  if (result.success) {
108591
108898
  const versionStr = result.installedVersion ? ` to v${result.installedVersion}` : "";
108592
108899
  console.log(`
108593
- ${GREEN}✔${RESET} ${WHITE}December CLI successfully updated${versionStr} via ${result.method}!${RESET}`);
108900
+ ${GREEN}December CLI successfully updated${versionStr} via ${result.method}!${RESET}`);
108594
108901
  if (result.collisionFixed && result.cleanedBinaries && result.cleanedBinaries.length > 0) {
108595
108902
  console.log(`
108596
- ${GREEN}✔${RESET} ${WHITE}Resolved ${result.cleanedBinaries.length} conflicting older binary location(s):${RESET}`);
108903
+ ${WHITE}Resolved ${result.cleanedBinaries.length} conflicting older binary location(s):${RESET}`);
108597
108904
  for (const b of result.cleanedBinaries) {
108598
108905
  console.log(` ${GRAY}• ${b}${RESET}`);
108599
108906
  }
@@ -108608,12 +108915,12 @@ ${YELLOW}ℹ${RESET} ${GRAY}Note: If your current terminal still runs an older
108608
108915
  } else {
108609
108916
  if (result.isPermissionError) {
108610
108917
  console.error(`
108611
- ${RED}✖${RESET} ${WHITE}Permission denied while installing global package.${RESET}`);
108918
+ ${RED}Permission denied while installing global package.${RESET}`);
108612
108919
  console.error(` ${YELLOW}→${RESET} Try running with elevated permissions: ${WHITE}${result.sudoCmd || result.manualCmd}${RESET}
108613
108920
  `);
108614
108921
  } else {
108615
108922
  console.error(`
108616
- ${RED}✖${RESET} Failed to update December CLI via ${result.method}: ${result.error || "Unknown error"}`);
108923
+ ${RED}Failed to update December CLI via ${result.method}: ${result.error || "Unknown error"}${RESET}`);
108617
108924
  console.error(` Try running manually: ${WHITE}${result.manualCmd}${RESET}
108618
108925
  `);
108619
108926
  }
@@ -108663,11 +108970,11 @@ ${BLUE}✱${RESET} ${WHITE}December CLI Health & Environment Doctor${RESET}
108663
108970
  if (target) {
108664
108971
  const fixed = await resolveAndCleanStaleBinaries2(target, diagnosis.allBinaries);
108665
108972
  if (fixed.length > 0) {
108666
- console.log(` ${GREEN}✔ Forwarded ${fixed.length} shadowed binary path(s) to primary active binary (${target.path}).${RESET}`);
108973
+ console.log(` ${GREEN}Forwarded ${fixed.length} shadowed binary path(s) to primary active binary (${target.path}).${RESET}`);
108667
108974
  console.log(` ${YELLOW}ℹ Run "hash -r" (bash) or restart your terminal to apply.${RESET}
108668
108975
  `);
108669
108976
  } else {
108670
- console.log(` ${GREEN}✔ All binary links are already aligned.${RESET}
108977
+ console.log(` ${GREEN}All binary links are already aligned.${RESET}
108671
108978
  `);
108672
108979
  }
108673
108980
  }
@@ -108676,7 +108983,7 @@ ${BLUE}✱${RESET} ${WHITE}December CLI Health & Environment Doctor${RESET}
108676
108983
  `);
108677
108984
  }
108678
108985
  } else {
108679
- console.log(` ${GREEN}✔ No binary collisions detected. Clean single installation.${RESET}
108986
+ console.log(` ${GREEN}No binary collisions detected. Clean single installation.${RESET}
108680
108987
  `);
108681
108988
  }
108682
108989
  const config = await loadConfig2();
@@ -273172,20 +273479,20 @@ var init_subscription_select_menu = __esm(async () => {
273172
273479
  jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
273173
273480
  SUBSCRIPTION_MENU_ITEMS = [
273174
273481
  {
273175
- label: "GitHub Copilot",
273176
- value: "copilot"
273177
- },
273178
- {
273179
- label: "Claude Code",
273482
+ label: "Anthropic (Claude)",
273180
273483
  value: "claude"
273181
273484
  },
273182
273485
  {
273183
- label: "ChatGPT Plus / Team / Pro",
273184
- value: "codex"
273486
+ label: "GitHub (Copilot)",
273487
+ value: "copilot"
273185
273488
  },
273186
273489
  {
273187
- label: "Google Gemini / Antigravity",
273490
+ label: "Google (Gemini / Antigravity)",
273188
273491
  value: "gemini"
273492
+ },
273493
+ {
273494
+ label: "OpenAI (ChatGPT)",
273495
+ value: "codex"
273189
273496
  }
273190
273497
  ];
273191
273498
  });
@@ -274237,6 +274544,7 @@ var init_src7 = __esm(async () => {
274237
274544
  var AUTH_REQUIRED_NOTICE = `You are not logged in and have no custom API keys (BYOK) configured.
274238
274545
 
274239
274546
  Please run \`/login\` to:
274547
+ - Link an AI Subscription (Copilot, Claude, ChatGPT, Gemini), or
274240
274548
  - Sign in with your December account (Cloud Wallet), or
274241
274549
  - Configure Bring Your Own Key (BYOK) for providers like OpenAI, Anthropic, Gemini, OpenRouter, etc.`, HANDOFF_LOGIN_REQUIRED_NOTICE = "Cloud handoff migrates your local terminal session and workspace to December Cloud (https://trydecember.com).\n\nTo proceed, please log in:\n- Type `/login` and select Sign in with December (Device Code), or\n- Run `december login` in your terminal", HANDOFF_INSUFFICIENT_CREDITS_NOTICE = "Insufficient credits in December Wallet ($0.00). Cloud handoff requires active credits to spin up remote cloud sandbox sessions on December Cloud.\n\nPlease add credits at https://trydecember.com/settings/billing to continue, then re-run `/handoff`.", HANDOFF_SUCCESS_NOTICE = (sessionId) => `Workspace handed off successfully!
274242
274550
 
@@ -274924,7 +275232,7 @@ function parseErrorMessage(err) {
274924
275232
  }
274925
275233
  const isAuthError = lowerStr.includes("401") || lowerStr.includes("unauthorized") || lowerStr.includes("invalid token") || lowerStr.includes("access token expired") || lowerStr.includes("session expired") || lowerStr.includes("session not found");
274926
275234
  if (isAuthError && !finalResult.includes("Please run `/login`") && !finalResult.includes("Please run /login")) {
274927
- const authNotice = "Authentication failed or session expired. Please run `/login` to sign in with your December account (Cloud Wallet) or configure Bring Your Own Key (BYOK).\n";
275235
+ const authNotice = "Authentication failed or session expired. Please run `/login` to sign in with your December account (Cloud Wallet), relink your AI Subscription, or configure Bring Your Own Key (BYOK).\n";
274928
275236
  return authNotice + finalResult;
274929
275237
  }
274930
275238
  return finalResult;
@@ -275472,6 +275780,7 @@ Please open [${uri}](${uri}) on any device and enter code: \`${code}\``
275472
275780
  const handleSubscriptionSelect = async (item) => {
275473
275781
  const config3 = await loadConfig();
275474
275782
  const { getSubscriptionAdapter: getSubscriptionAdapter2, verifyAndResolveSubscription: verifyAndResolveSubscription2, loginSubscription: loginSubscription2 } = await Promise.resolve().then(() => (init_subscription_manager(), exports_subscription_manager));
275783
+ const { formatSubscriptionToast: formatSubscriptionToast2, formatSubscriptionCard: formatSubscriptionCard2 } = await Promise.resolve().then(() => exports_formatters);
275475
275784
  if (getSubscriptionAdapter2(item.value)) {
275476
275785
  const { getDefaultModelForProvider: getDefaultModelForProvider2 } = await Promise.resolve().then(() => (init_models5(), exports_models2));
275477
275786
  const { getAuthStatus: getAuthStatus2 } = await Promise.resolve().then(() => (init_config(), exports_config));
@@ -275503,7 +275812,7 @@ Please open [${uri}](${uri}) on any device and enter code: \`${code}\``
275503
275812
  const { fetchLiveProviderModels: fetchLiveProviderModels2 } = await Promise.resolve().then(() => (init_models5(), exports_models2));
275504
275813
  fetchLiveProviderModels2(verifiedBundle.provider, verifiedBundle.accessToken, verifiedBundle.endpoint).catch(() => {});
275505
275814
  setAuthMode("none");
275506
- addToast(`Verified local ${item.value.toUpperCase()} subscription (${verifiedBundle.subscriptionType || "active"})`, "success");
275815
+ addToast(formatSubscriptionToast2(verifiedBundle, targetModel), "success");
275507
275816
  return;
275508
275817
  }
275509
275818
  const adapter2 = getSubscriptionAdapter2(item.value);
@@ -275582,15 +275891,15 @@ Please open [${uri}](${uri}) on your device and enter code: \`${code}\``;
275582
275891
  blocks: [
275583
275892
  {
275584
275893
  type: "text",
275585
- content: `Successfully authenticated and verified ${item.value.toUpperCase()} subscription!`,
275586
- color: "#6EE7B7"
275894
+ content: `
275895
+ ${formatSubscriptionCard2(bundle, targetModel)}`
275587
275896
  }
275588
275897
  ]
275589
275898
  }
275590
275899
  ]);
275591
275900
  const { fetchLiveProviderModels: fetchLiveProviderModels2 } = await Promise.resolve().then(() => (init_models5(), exports_models2));
275592
275901
  fetchLiveProviderModels2(bundle.provider, bundle.accessToken, bundle.endpoint).catch(() => {});
275593
- addToast(`Connected to ${item.value.toUpperCase()} subscription`, "success");
275902
+ addToast(formatSubscriptionToast2(bundle, targetModel), "success");
275594
275903
  } catch (err) {
275595
275904
  const errorText = `Subscription verification failed: ${err?.message || String(err)}`;
275596
275905
  setAuthError(errorText);
@@ -276796,7 +277105,13 @@ ${decStatus}
276796
277105
  setHasBothAuth(authStatus.hasByok && authStatus.hasDecember);
276797
277106
  setSettingsAuthPriority(authStatus.authPriority);
276798
277107
  }
276799
- addToast(`Successfully authenticated ${targetProvider.toUpperCase()}!`, "success");
277108
+ if (providerConfig?.subscription) {
277109
+ const { formatSubscriptionToast: formatSubscriptionToast2 } = await Promise.resolve().then(() => exports_formatters);
277110
+ addToast(formatSubscriptionToast2(providerConfig.subscription, providerConfig.model), "success");
277111
+ } else {
277112
+ const { formatSubscriptionDisplayName: formatSubscriptionDisplayName2 } = await Promise.resolve().then(() => exports_formatters);
277113
+ addToast(`Connected to ${formatSubscriptionDisplayName2(targetProvider)}`, "success");
277114
+ }
276800
277115
  } catch (e2) {
276801
277116
  addToast(`Login failed: ${e2.message}`, "error");
276802
277117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trydecember/cli",
3
- "version": "0.3.23",
3
+ "version": "0.3.24",
4
4
  "description": "a coding agent for terminal and cloud.",
5
5
  "homepage": "https://trydecember.com",
6
6
  "repository": {