@eddyskywalker/dsh-chatgpt-subscription 0.84.0 → 0.85.0

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 (57) hide show
  1. package/lib/client.js +3155 -667
  2. package/lib/client.js.map +1 -1
  3. package/lib/index.js +70 -21
  4. package/lib/types/client/common/ComposerQuotaBadge.d.ts.map +1 -1
  5. package/lib/types/client/common/ModelChecklist.d.ts +21 -1
  6. package/lib/types/client/common/ModelChecklist.d.ts.map +1 -1
  7. package/lib/types/client/common/model-checklist-styles.d.ts.map +1 -1
  8. package/lib/types/client/features/session-quota/SessionQuotaSection.d.ts +22 -0
  9. package/lib/types/client/features/session-quota/SessionQuotaSection.d.ts.map +1 -0
  10. package/lib/types/client/features/session-quota/adapters.d.ts +42 -0
  11. package/lib/types/client/features/session-quota/adapters.d.ts.map +1 -0
  12. package/lib/types/client/features/session-quota/index.d.ts +13 -0
  13. package/lib/types/client/features/session-quota/index.d.ts.map +1 -0
  14. package/lib/types/client/features/session-quota/locales.d.ts +71 -0
  15. package/lib/types/client/features/session-quota/locales.d.ts.map +1 -0
  16. package/lib/types/client/features/session-quota/model.d.ts +41 -0
  17. package/lib/types/client/features/session-quota/model.d.ts.map +1 -0
  18. package/lib/types/client/features/session-quota/panel-availability.d.ts +10 -0
  19. package/lib/types/client/features/session-quota/panel-availability.d.ts.map +1 -0
  20. package/lib/types/client/features/session-quota/session-quota-store.d.ts +13 -0
  21. package/lib/types/client/features/session-quota/session-quota-store.d.ts.map +1 -0
  22. package/lib/types/client/features/session-quota/styles.d.ts +2 -0
  23. package/lib/types/client/features/session-quota/styles.d.ts.map +1 -0
  24. package/lib/types/client/hub/HubAddSheet.d.ts +17 -0
  25. package/lib/types/client/hub/HubAddSheet.d.ts.map +1 -0
  26. package/lib/types/client/hub/HubOverview.d.ts +16 -11
  27. package/lib/types/client/hub/HubOverview.d.ts.map +1 -1
  28. package/lib/types/client/hub/HubProviderRow.d.ts +34 -0
  29. package/lib/types/client/hub/HubProviderRow.d.ts.map +1 -0
  30. package/lib/types/client/hub/ProviderHubSection.d.ts.map +1 -1
  31. package/lib/types/client/hub/brand-icons.d.ts +4 -2
  32. package/lib/types/client/hub/brand-icons.d.ts.map +1 -1
  33. package/lib/types/client/hub/hub-overview-helpers.d.ts +29 -0
  34. package/lib/types/client/hub/hub-overview-helpers.d.ts.map +1 -0
  35. package/lib/types/client/hub/hub-styles.d.ts.map +1 -1
  36. package/lib/types/client/hub/providers.d.ts +3 -0
  37. package/lib/types/client/hub/providers.d.ts.map +1 -1
  38. package/lib/types/client/index.d.ts +2 -0
  39. package/lib/types/client/index.d.ts.map +1 -1
  40. package/lib/types/client/locales-ru/command-code.d.ts.map +1 -1
  41. package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
  42. package/lib/types/client/locales-ru/index.d.ts.map +1 -1
  43. package/lib/types/client/locales-ru/session-quota.d.ts +3 -0
  44. package/lib/types/client/locales-ru/session-quota.d.ts.map +1 -0
  45. package/lib/types/client/providers/codex-chatgpt/CodexComposerQuota.d.ts.map +1 -1
  46. package/lib/types/client/providers/codex-chatgpt/locales.d.ts +67 -1
  47. package/lib/types/client/providers/codex-chatgpt/locales.d.ts.map +1 -1
  48. package/lib/types/client/providers/command-code/CommandCodeSection.d.ts.map +1 -1
  49. package/lib/types/client/providers/command-code/locales.d.ts +20 -2
  50. package/lib/types/client/providers/command-code/locales.d.ts.map +1 -1
  51. package/lib/types/client/providers/command-code/model-vendors.d.ts +12 -0
  52. package/lib/types/client/providers/command-code/model-vendors.d.ts.map +1 -0
  53. package/lib/types/compat.d.ts +1 -1
  54. package/lib/types/index.d.ts.map +1 -1
  55. package/lib/types/shared/hub-contracts.d.ts +4 -0
  56. package/lib/types/shared/hub-contracts.d.ts.map +1 -1
  57. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -840,7 +840,7 @@ const ROUTE_PREFIX$5 = "/api/dsh-chatgpt-subscription";
840
840
  * `test/responses-client.test.ts` asserts the two agree, so a release that
841
841
  * forgets this constant fails the suite instead of shipping quietly.
842
842
  */
843
- const PLUGIN_VERSION = "0.84.0";
843
+ const PLUGIN_VERSION = "0.85.0";
844
844
  const CODEX_CHATGPT_PROVIDER_ID = "codex-chatgpt";
845
845
  const CODEX_API_BASE = "https://chatgpt.com/backend-api/codex";
846
846
  const CODEX_RESPONSES_URL = `${CODEX_API_BASE}/responses`;
@@ -118208,6 +118208,12 @@ function apply(ctx, pluginConfig = {}) {
118208
118208
  };
118209
118209
  const disposeRoutes = registerRoutes(ctx, oauth, usage, preferences, proxyManager, searchSwitcher, readRouteAudit, codexAccountPool, fetchConfiguration, { storage: poolStorageSettings });
118210
118210
  const routable = (accounts) => accounts.some((account) => account.authStatus === void 0 || account.authStatus === "ok");
118211
+ const accountHintOf = (accounts) => {
118212
+ const active = accounts.find((a) => a.isPrimary) ?? accounts[0];
118213
+ if (!active) return void 0;
118214
+ const label = active.alias?.trim() || active.planType?.trim() || active.nickname?.trim() || active.email?.trim();
118215
+ return label && label.length > 0 ? label : void 0;
118216
+ };
118211
118217
  const disposeHubOverview = registerHubOverviewRoutes(ctx, [
118212
118218
  {
118213
118219
  id: "chatgpt",
@@ -118216,12 +118222,15 @@ function apply(ctx, pluginConfig = {}) {
118216
118222
  read: async () => {
118217
118223
  const current = preferences.status();
118218
118224
  const accounts = await codexAccountPool.listAccounts().catch(() => []);
118225
+ const accountHint = accountHintOf(accounts);
118219
118226
  return {
118220
118227
  enabled: current.enabled !== false,
118221
118228
  accountCount: accounts.length,
118222
118229
  authenticated: routable(accounts),
118223
118230
  enabledModelCount: current.visibleModelIds.length,
118224
- totalModelCount: CODEX_MODEL_CATALOG.length
118231
+ totalModelCount: CODEX_MODEL_CATALOG.length,
118232
+ ...accountHint ? { accountHint } : {},
118233
+ ...current.visibleModelIds.length > 0 ? { modelIds: current.visibleModelIds } : {}
118225
118234
  };
118226
118235
  }
118227
118236
  },
@@ -118233,12 +118242,15 @@ function apply(ctx, pluginConfig = {}) {
118233
118242
  const current = commandCodePreferences.status();
118234
118243
  const accounts = await commandCodeAccountPool.listAccounts().catch(() => []);
118235
118244
  const total = catalogTotal((await commandCodeModelSettings.read()).catalogModels.length);
118245
+ const accountHint = accountHintOf(accounts);
118236
118246
  return {
118237
118247
  enabled: current.enabled !== false,
118238
118248
  accountCount: accounts.length,
118239
118249
  authenticated: routable(accounts),
118240
118250
  enabledModelCount: total === null ? null : Math.min(current.enabledModelIds?.length ?? 0, total),
118241
- totalModelCount: total
118251
+ totalModelCount: total,
118252
+ ...accountHint ? { accountHint } : {},
118253
+ ...current.enabledModelIds?.length ? { modelIds: current.enabledModelIds } : {}
118242
118254
  };
118243
118255
  }
118244
118256
  },
@@ -118250,12 +118262,15 @@ function apply(ctx, pluginConfig = {}) {
118250
118262
  const current = kimiCodePreferences.status();
118251
118263
  const accounts = await kimiCodeAccountPool.listAccounts().catch(() => []);
118252
118264
  const total = catalogTotal((await kimiCodeModelSettings.read()).catalogModels.length);
118265
+ const accountHint = accountHintOf(accounts);
118253
118266
  return {
118254
118267
  enabled: current.enabled !== false,
118255
118268
  accountCount: accounts.length,
118256
118269
  authenticated: routable(accounts),
118257
118270
  enabledModelCount: total === null ? null : Math.min(current.enabledModelIds?.length ?? 0, total),
118258
- totalModelCount: total
118271
+ totalModelCount: total,
118272
+ ...accountHint ? { accountHint } : {},
118273
+ ...current.enabledModelIds?.length ? { modelIds: current.enabledModelIds } : {}
118259
118274
  };
118260
118275
  }
118261
118276
  },
@@ -118267,12 +118282,15 @@ function apply(ctx, pluginConfig = {}) {
118267
118282
  const current = minimaxCodePreferences.status();
118268
118283
  const accounts = await minimaxCodeAccountPool.listAccounts().catch(() => []);
118269
118284
  const total = catalogTotal(catalogSize$1());
118285
+ const accountHint = accountHintOf(accounts);
118270
118286
  return {
118271
118287
  enabled: current.enabled !== false,
118272
118288
  accountCount: accounts.length,
118273
118289
  authenticated: routable(accounts),
118274
118290
  enabledModelCount: total === null ? null : Math.min(current.enabledModelIds?.length ?? 0, total),
118275
- totalModelCount: total
118291
+ totalModelCount: total,
118292
+ ...accountHint ? { accountHint } : {},
118293
+ ...current.enabledModelIds?.length ? { modelIds: current.enabledModelIds } : {}
118276
118294
  };
118277
118295
  }
118278
118296
  },
@@ -118284,12 +118302,15 @@ function apply(ctx, pluginConfig = {}) {
118284
118302
  const current = claudePreferences.status();
118285
118303
  const accounts = await claudeAccountPool.listAccounts().catch(() => []);
118286
118304
  const total = catalogTotal(getCachedCatalog$2().length);
118305
+ const accountHint = accountHintOf(accounts);
118287
118306
  return {
118288
118307
  enabled: current.enabled !== false,
118289
118308
  accountCount: accounts.length,
118290
118309
  authenticated: routable(accounts),
118291
118310
  enabledModelCount: total === null ? null : Math.min(current.enabledModelIds?.length ?? 0, total),
118292
- totalModelCount: total
118311
+ totalModelCount: total,
118312
+ ...accountHint ? { accountHint } : {},
118313
+ ...current.enabledModelIds?.length ? { modelIds: current.enabledModelIds } : {}
118293
118314
  };
118294
118315
  }
118295
118316
  },
@@ -118309,13 +118330,15 @@ function apply(ctx, pluginConfig = {}) {
118309
118330
  await claudeApiCatalog.warm();
118310
118331
  const snapshot = claudeApiCatalog.snapshot();
118311
118332
  const models = claudeApiModelOptions(snapshot.entries, current, snapshot.live);
118333
+ const enabledModels = models.filter((model) => model.enabled);
118312
118334
  const total = catalogTotal(models.length);
118313
118335
  return {
118314
118336
  enabled: current.enabled,
118315
118337
  accountCount: 1,
118316
118338
  authenticated: true,
118317
- enabledModelCount: models.filter((model) => model.enabled).length,
118318
- totalModelCount: total
118339
+ enabledModelCount: enabledModels.length,
118340
+ totalModelCount: total,
118341
+ ...enabledModels.length > 0 ? { modelIds: enabledModels.map((model) => model.id) } : {}
118319
118342
  };
118320
118343
  }
118321
118344
  },
@@ -118327,12 +118350,15 @@ function apply(ctx, pluginConfig = {}) {
118327
118350
  const current = glmCodingPlanPreferences.status();
118328
118351
  const accounts = await glmCodingPlanAccountPool.listAccounts().catch(() => []);
118329
118352
  const total = catalogTotal(catalogSize());
118353
+ const accountHint = accountHintOf(accounts);
118330
118354
  return {
118331
118355
  enabled: current.enabled !== false,
118332
118356
  accountCount: accounts.length,
118333
118357
  authenticated: routable(accounts),
118334
118358
  enabledModelCount: total === null ? null : Math.min(current.enabledModelIds?.length ?? 0, total),
118335
- totalModelCount: total
118359
+ totalModelCount: total,
118360
+ ...accountHint ? { accountHint } : {},
118361
+ ...current.enabledModelIds?.length ? { modelIds: current.enabledModelIds } : {}
118336
118362
  };
118337
118363
  }
118338
118364
  },
@@ -118345,12 +118371,16 @@ function apply(ctx, pluginConfig = {}) {
118345
118371
  const current = await ollamaModelSettings.read();
118346
118372
  const total = catalogTotal(current.catalogModels.length);
118347
118373
  const selected = current.enabledModelIds === null ? total : current.enabledModelIds.length;
118374
+ const accountHint = accountHintOf(accounts);
118375
+ const modelIds = current.enabledModelIds ?? current.catalogModels.map((model) => model.id);
118348
118376
  return {
118349
118377
  enabled: current.enabled !== false,
118350
118378
  accountCount: accounts.length,
118351
118379
  authenticated: routable(accounts),
118352
118380
  enabledModelCount: total === null || selected === null ? null : Math.min(selected, total),
118353
- totalModelCount: total
118381
+ totalModelCount: total,
118382
+ ...accountHint ? { accountHint } : {},
118383
+ ...modelIds.length > 0 ? { modelIds } : {}
118354
118384
  };
118355
118385
  }
118356
118386
  },
@@ -118373,12 +118403,14 @@ function apply(ctx, pluginConfig = {}) {
118373
118403
  const cachedAuth = antigravityAcpAuth.peek();
118374
118404
  if (cachedAuth === void 0) antigravityAcpAuth.read().catch(() => void 0);
118375
118405
  const authenticated = cachedAuth?.authenticated === true;
118406
+ const modelIds = current.enabledModelIds ?? catalog?.models.map((model) => model.id) ?? [];
118376
118407
  return {
118377
118408
  enabled: true,
118378
118409
  accountCount: authenticated ? 1 : 0,
118379
118410
  authenticated,
118380
118411
  enabledModelCount: total === null || selected === null ? null : Math.min(selected, total),
118381
- totalModelCount: total
118412
+ totalModelCount: total,
118413
+ ...modelIds.length > 0 ? { modelIds } : {}
118382
118414
  };
118383
118415
  }
118384
118416
  },
@@ -118390,12 +118422,15 @@ function apply(ctx, pluginConfig = {}) {
118390
118422
  const current = stepCodePreferences.status();
118391
118423
  const accounts = await stepCodeAccountPool.listAccounts().catch(() => []);
118392
118424
  const total = catalogTotal(stepCodeCatalogSize());
118425
+ const accountHint = accountHintOf(accounts);
118393
118426
  return {
118394
118427
  enabled: current.enabled !== false,
118395
118428
  accountCount: accounts.length,
118396
118429
  authenticated: routable(accounts),
118397
118430
  enabledModelCount: total === null ? null : Math.min(current.enabledModelIds?.length ?? 0, total),
118398
- totalModelCount: total
118431
+ totalModelCount: total,
118432
+ ...accountHint ? { accountHint } : {},
118433
+ ...current.enabledModelIds?.length ? { modelIds: current.enabledModelIds } : {}
118399
118434
  };
118400
118435
  }
118401
118436
  },
@@ -118411,12 +118446,16 @@ function apply(ctx, pluginConfig = {}) {
118411
118446
  const catalog = cachedQoderModelCatalog(region);
118412
118447
  const total = catalogTotal(catalog.length);
118413
118448
  const selected = convergeQoderSelection(current.enabledModelIds, qoderCatalogIsLive(region), catalog);
118449
+ const accountHint = accountHintOf(accounts);
118450
+ const modelIds = selected ?? catalog.map((model) => model.id);
118414
118451
  return {
118415
118452
  enabled: current.enabled !== false,
118416
118453
  accountCount: accounts.length,
118417
118454
  authenticated: routable(accounts),
118418
118455
  enabledModelCount: total === null ? null : selected === null ? total : Math.min(selected.length, total),
118419
- totalModelCount: total
118456
+ totalModelCount: total,
118457
+ ...accountHint ? { accountHint } : {},
118458
+ ...modelIds.length > 0 ? { modelIds } : {}
118420
118459
  };
118421
118460
  }
118422
118461
  },
@@ -118429,12 +118468,15 @@ function apply(ctx, pluginConfig = {}) {
118429
118468
  const current = workBuddyPreferences.status();
118430
118469
  const accounts = await workBuddyAccountPool.listAccounts().catch(() => []);
118431
118470
  const total = catalogTotal(getCachedCatalog().length);
118471
+ const accountHint = accountHintOf(accounts);
118432
118472
  return {
118433
118473
  enabled: current.enabled !== false,
118434
118474
  accountCount: accounts.length,
118435
118475
  authenticated: routable(accounts),
118436
118476
  enabledModelCount: total === null ? null : Math.min(current.enabledModelIds?.length ?? 0, total),
118437
- totalModelCount: total
118477
+ totalModelCount: total,
118478
+ ...accountHint ? { accountHint } : {},
118479
+ ...current.enabledModelIds?.length ? { modelIds: current.enabledModelIds } : {}
118438
118480
  };
118439
118481
  }
118440
118482
  },
@@ -118444,12 +118486,14 @@ function apply(ctx, pluginConfig = {}) {
118444
118486
  canToggle: true,
118445
118487
  read: async () => {
118446
118488
  const [current, credentials] = await Promise.all([qianwenSettings.read(), qianwenStore.read()]);
118489
+ const enabledModels = catalogModelOptions$1(current).filter((model) => model.enabled);
118447
118490
  return {
118448
118491
  enabled: current.enabled,
118449
118492
  accountCount: credentials === null ? 0 : 1,
118450
118493
  authenticated: credentials !== null,
118451
- enabledModelCount: catalogModelOptions$1(current).filter((model) => model.enabled).length,
118452
- totalModelCount: QIANWEN_MODEL_CATALOG.length
118494
+ enabledModelCount: enabledModels.length,
118495
+ totalModelCount: QIANWEN_MODEL_CATALOG.length,
118496
+ ...enabledModels.length > 0 ? { modelIds: enabledModels.map((model) => model.id) } : {}
118453
118497
  };
118454
118498
  }
118455
118499
  },
@@ -118468,13 +118512,17 @@ function apply(ctx, pluginConfig = {}) {
118468
118512
  };
118469
118513
  await relayOneCatalog.warm();
118470
118514
  const models = relayOneModelOptions(relayOneCatalog.snapshot().entries, current).filter((model) => model.kind === "chat");
118515
+ const enabledModels = models.filter((model) => model.enabled);
118471
118516
  const total = catalogTotal(models.length);
118517
+ const accountHint = accountHintOf(accounts);
118472
118518
  return {
118473
118519
  enabled: current.enabled,
118474
118520
  accountCount: accounts.length,
118475
118521
  authenticated: true,
118476
- enabledModelCount: models.filter((model) => model.enabled).length,
118477
- totalModelCount: total
118522
+ enabledModelCount: enabledModels.length,
118523
+ totalModelCount: total,
118524
+ ...accountHint ? { accountHint } : {},
118525
+ ...enabledModels.length > 0 ? { modelIds: enabledModels.map((model) => model.id) } : {}
118478
118526
  };
118479
118527
  }
118480
118528
  },
@@ -118485,13 +118533,14 @@ function apply(ctx, pluginConfig = {}) {
118485
118533
  read: async () => {
118486
118534
  const current = await awsQuickSettings.read();
118487
118535
  const auth = awsQuickOutpost.cachedAuth();
118488
- const enabledCount = current.enabledModelIds === null ? QUICK_MODELS.length : current.enabledModelIds.length;
118536
+ const modelIds = current.enabledModelIds ?? QUICK_MODELS.map((model) => model.id);
118489
118537
  return {
118490
118538
  enabled: current.enabled,
118491
118539
  accountCount: auth.authenticated ? 1 : 0,
118492
118540
  authenticated: auth.authenticated,
118493
- enabledModelCount: enabledCount,
118494
- totalModelCount: QUICK_MODELS.length
118541
+ enabledModelCount: modelIds.length,
118542
+ totalModelCount: QUICK_MODELS.length,
118543
+ ...modelIds.length > 0 ? { modelIds } : {}
118495
118544
  };
118496
118545
  }
118497
118546
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerQuotaBadge.d.ts","sourceRoot":"","sources":["../../../../src/client/common/ComposerQuotaBadge.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AAGxE,MAAM,WAAW,kBAAkB;IACjC,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAA;IACZ,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;IACtC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED,qEAAqE;AACrE,wBAAgB,UAAU,CAAC,gBAAgB,EAAE,MAAM,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAEhF;AAED,MAAM,WAAW,uBAAuB,CAAC,MAAM,SAAS;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE;IAChF,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,C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AM,GAAG,IAAI,CAAA;IACvB,kFAAkF;IAClF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAe,EAAE,SAAS,EAAE,EAAE,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAsCvI"}
@@ -1,9 +1,17 @@
1
+ import { type ProviderMarkKey } from '../hub/brand-icons.tsx';
2
+ export interface ModelChecklistGroup {
3
+ key: string;
4
+ label: string;
5
+ mark?: ProviderMarkKey | null;
6
+ }
1
7
  export interface ModelChecklistItem {
2
8
  id: string;
3
9
  name: string;
4
10
  /** One quiet line under the name (e.g. the context window); omit when none. */
5
11
  hint?: string;
6
12
  enabled: boolean;
13
+ /** Optional vendor/category group. Two or more distinct groups activate split view. */
14
+ group?: ModelChecklistGroup;
7
15
  }
8
16
  export interface ModelChecklistLabels {
9
17
  selectAll: string;
@@ -15,6 +23,16 @@ export interface ModelChecklistLabels {
15
23
  countTemplate?: string;
16
24
  /** aria-label of the list itself; omit when the section header already names it. */
17
25
  list?: string;
26
+ /** Label for the "All" tab in split-pane vendor mode. */
27
+ allGroups?: string;
28
+ /** Label for the "Enabled" tab in split-pane vendor mode. */
29
+ enabledGroup?: string;
30
+ /** Search input placeholder in split-pane vendor mode. */
31
+ searchPlaceholder?: string;
32
+ /** Empty-state text when a search matches nothing. */
33
+ noMatches?: string;
34
+ /** aria-label for the left vendor tablist in split-pane mode. */
35
+ groupsNav?: string;
18
36
  }
19
37
  interface Props {
20
38
  items: ModelChecklistItem[];
@@ -22,8 +40,10 @@ interface Props {
22
40
  busy: boolean;
23
41
  onToggle(id: string, enabled: boolean): void;
24
42
  onToggleAll(enabled: boolean): void;
43
+ /** Optional batch toggle for the active vendor group in split-pane mode. */
44
+ onToggleGroup?(ids: string[], enabled: boolean): void;
25
45
  labels: ModelChecklistLabels;
26
46
  }
27
- export declare function ModelChecklist({ items, busy, onToggle, onToggleAll, labels }: Props): React.JSX.Element;
47
+ export declare function ModelChecklist({ items, busy, onToggle, onToggleAll, onToggleGroup, labels }: Props): React.JSX.Element;
28
48
  export {};
29
49
  //# sourceMappingURL=ModelChecklist.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModelChecklist.d.ts","sourceRoot":"","sources":["../../../../src/client/common/ModelChecklist.tsx"],"names":[],"mappings":"AAgBA,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,UAAU,KAAK;IACb,KAAK,EAAE,kBAAkB,EAAE,CAAA;IAC3B,6EAA6E;IAC7E,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5C,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACnC,MAAM,EAAE,oBAAoB,CAAA;CAC7B;AAID,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqCvG"}
1
+ {"version":3,"file":"ModelChecklist.d.ts","sourceRoot":"","sources":["../../../../src/client/common/ModelChecklist.tsx"],"names":[],"mappings":"AAW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oB,CAAA;CAC7B;AA8CD,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwMtH"}
@@ -1 +1 @@
1
- {"version":3,"file":"model-checklist-styles.d.ts","sourceRoot":"","sources":["../../../../src/client/common/model-checklist-styles.ts"],"names":[],"mappings":"AA+BA,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"}
1
+ {"version":3,"file":"model-checklist-styles.d.ts","sourceRoot":"","sources":["../../../../src/client/common/model-checklist-styles.ts"],"names":[],"mappings":"AAqDA,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"}
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import type { ModelDirectoryState } from '@deepseek-ai/dsh-client-ui-model-selection/client';
3
+ import type { SnapshotStore } from '../../providers/codex-chatgpt/store.ts';
4
+ import { type SessionQuotaAdapter } from './adapters.ts';
5
+ export interface SessionQuotaSlotProps {
6
+ directory?: SnapshotStore<ModelDirectoryState>;
7
+ loadModelDirectory?: () => void;
8
+ adapters?: ReadonlyMap<string, SessionQuotaAdapter>;
9
+ }
10
+ /**
11
+ * Subscription quota card rendered inside DSH's native session details panel
12
+ * (`conversation.session.panel.section`). Returns null when the active session
13
+ * is not on a supported subscription line or has nothing to report, so the host
14
+ * panel hides the section automatically.
15
+ */
16
+ export declare function SessionQuotaSection(props: SessionQuotaSlotProps): React.JSX.Element | null;
17
+ /**
18
+ * Trailing summary reading shown on the right side of the section header when
19
+ * folded (`conversation.session.panel.section.actions`).
20
+ */
21
+ export declare function SessionQuotaReading(props: SessionQuotaSlotProps): React.JSX.Element | null;
22
+ //# sourceMappingURL=SessionQuotaSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionQuotaSection.d.ts","sourceRoot":"","sources":["../../../../../src/client/features/session-quota/SessionQuotaSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAE3E,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAIhF,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC9C,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;CACpD;AAID;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAS1F;AAgFD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAS1F"}
@@ -0,0 +1,42 @@
1
+ import type { AntigravityAcpStatusDto } from '../../../shared/antigravity-acp-contracts.ts';
2
+ import type { ClaudeWebStatus } from '../../../shared/claude-contracts.ts';
3
+ import type { ClinePassWebStatus } from '../../../shared/cline-pass-contracts.ts';
4
+ import type { CommandCodeWebStatus } from '../../../shared/command-code-contracts.ts';
5
+ import type { PluginStatusDto } from '../../../shared/contracts.ts';
6
+ import { type GlmStatusDto } from '../../../shared/glm-coding-plan-contracts.ts';
7
+ import type { KimiCodeWebStatus } from '../../../shared/kimi-code-contracts.ts';
8
+ import type { MinimaxCodeWebStatus } from '../../../shared/minimax-code-contracts.ts';
9
+ import type { OpenDesignWebStatus } from '../../../shared/opendesign-contracts.ts';
10
+ import { type QianwenStatusDto } from '../../../shared/qianwen-token-plan-contracts.ts';
11
+ import { type QoderStatusDto } from '../../../shared/qoder-contracts.ts';
12
+ import { type RelayOneStatusDto } from '../../../shared/relayone-contracts.ts';
13
+ import { type StepCodeStatusDto } from '../../../shared/step-code-contracts.ts';
14
+ import type { WorkBuddyWebStatus } from '../../../shared/workbuddy-contracts.ts';
15
+ import { type SessionQuotaDict, type SessionQuotaSnapshot } from './model.ts';
16
+ export interface SessionQuotaAdapter<Status = unknown> {
17
+ providerId: string;
18
+ readStatus(refresh: boolean): Promise<Status>;
19
+ toSnapshot(status: Status, modelId: string | undefined, dict: SessionQuotaDict, nowMs?: number): SessionQuotaSnapshot | null;
20
+ }
21
+ export declare function codexToSnapshot(status: PluginStatusDto, modelId: string | undefined, dict: SessionQuotaDict, nowMs?: number): SessionQuotaSnapshot | null;
22
+ export declare function claudeToSnapshot(status: ClaudeWebStatus, _modelId: string | undefined, dict: SessionQuotaDict, nowMs?: number): SessionQuotaSnapshot | null;
23
+ export declare function kimiToSnapshot(status: KimiCodeWebStatus, _modelId: string | undefined, dict: SessionQuotaDict, nowMs?: number): SessionQuotaSnapshot | null;
24
+ export declare function minimaxToSnapshot(status: MinimaxCodeWebStatus, _modelId: string | undefined, dict: SessionQuotaDict, nowMs?: number): SessionQuotaSnapshot | null;
25
+ export declare function commandCodeToSnapshot(status: CommandCodeWebStatus, _modelId: string | undefined, dict: SessionQuotaDict, nowMs?: number): SessionQuotaSnapshot | null;
26
+ export declare function glmToSnapshot(status: GlmStatusDto, _modelId: string | undefined, dict: SessionQuotaDict, nowMs?: number): SessionQuotaSnapshot | null;
27
+ export declare function stepCodeToSnapshot(status: StepCodeStatusDto, _modelId: string | undefined, dict: SessionQuotaDict, nowMs?: number): SessionQuotaSnapshot | null;
28
+ export declare function clinePassToSnapshot(status: ClinePassWebStatus, _modelId: string | undefined, dict: SessionQuotaDict, nowMs?: number): SessionQuotaSnapshot | null;
29
+ export declare function qoderToSnapshot(status: QoderStatusDto, _modelId: string | undefined, _dict: SessionQuotaDict): SessionQuotaSnapshot | null;
30
+ export declare function openDesignToSnapshot(status: OpenDesignWebStatus, _modelId: string | undefined, dict: SessionQuotaDict): SessionQuotaSnapshot | null;
31
+ export declare function workBuddyToSnapshot(status: WorkBuddyWebStatus, _modelId: string | undefined, dict: SessionQuotaDict, nowMs?: number): SessionQuotaSnapshot | null;
32
+ /**
33
+ * Antigravity (ACP): displays only plan tier and last-turn token usage.
34
+ * Official ACP does not report remaining quota percentages yet, so `bars` stays
35
+ * empty until upstream adds a quota query.
36
+ */
37
+ export declare function antigravityToSnapshot(status: AntigravityAcpStatusDto, _modelId: string | undefined, dict: SessionQuotaDict): SessionQuotaSnapshot | null;
38
+ export declare function qianwenToSnapshot(status: QianwenStatusDto, _modelId: string | undefined, dict: SessionQuotaDict): SessionQuotaSnapshot | null;
39
+ export declare function relayOneToSnapshot(status: RelayOneStatusDto, _modelId: string | undefined, dict: SessionQuotaDict): SessionQuotaSnapshot | null;
40
+ export declare const SESSION_QUOTA_ADAPTERS: ReadonlyMap<string, SessionQuotaAdapter<any>>;
41
+ export declare function formatRemainingPercent(value: number): string;
42
+ //# sourceMappingURL=adapters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../../../src/client/features/session-quota/adapters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAA;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AACrF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAA+B,KAAK,YAAY,EAAE,MAAM,8CAA8C,CAAA;AAC7G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AACrF,OAAO,KAAK,EAAE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jC,MAAM,EAAE,kBAAkB,EAC1B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE,gBAAgB,EACtB,KAAK,CAAC,EAAE,MAAM,GACb,oBAAoB,GAAG,IAAI,CA4C7B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,uBAAuB,EAC/B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE,gBAAgB,GACrB,oBAAoB,GAAG,IAAI,CAuB7B;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE,gBAAgB,GACrB,oBAAoB,GAAG,IAAI,CAuB7B;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,iBAAiB,EACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE,gBAAgB,GACrB,oBAAoB,GAAG,IAAI,CAsC7B;AAED,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAuE/E,CAAA;AAEF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Registers the subscription quota card into DSH's native session details panel
3
+ * (`conversation.session.panel.section` and `.section.actions`).
4
+ *
5
+ * On older harnesses that do not declare those slots, `slots.inject` never
6
+ * invokes the callback, `isSessionPanelQuotaActive()` stays false, and the
7
+ * bottom `conversation.input.right` composer capsules remain visible as before.
8
+ */
9
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
10
+ export declare const SESSION_QUOTA_SECTION_ID = "dsh-subscription-quota";
11
+ export declare const SESSION_QUOTA_SECTION_ORDER = 35;
12
+ export declare function installSessionQuotaPanel(ctx: ClientContext): void;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/features/session-quota/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAMnE,eAAO,MAAM,wBAAwB,2BAA2B,CAAA;AAChE,eAAO,MAAM,2BAA2B,KAAK,CAAA;AAsB7C,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAsCjE"}
@@ -0,0 +1,71 @@
1
+ export declare const NS_SESSION_QUOTA = "dsh-session-quota";
2
+ export declare const zh: {
3
+ readonly sectionTitle: "订阅额度";
4
+ readonly refresh: "刷新";
5
+ readonly refreshing: "刷新中…";
6
+ readonly remaining: "剩余";
7
+ readonly resetInDaysHours: "{days} 天 {hours} 小时后重置";
8
+ readonly resetInHoursMinutes: "{hours} 小时 {minutes} 分钟后重置";
9
+ readonly resetInMinutes: "{minutes} 分钟后重置";
10
+ readonly resetSoon: "即将重置";
11
+ readonly resetAt: "{time} 重置";
12
+ readonly windowFiveHour: "5 小时限额";
13
+ readonly windowWeekly: "周限额";
14
+ readonly windowMonthly: "月限额";
15
+ readonly windowHours: "{count} 小时限额";
16
+ readonly windowDays: "{count} 天限额";
17
+ readonly windowMinutes: "{count} 分钟限额";
18
+ readonly planTier: "套餐档位";
19
+ readonly lastInput: "最近输入";
20
+ readonly lastOutput: "最近输出";
21
+ readonly balance: "剩余余额";
22
+ readonly credits: "剩余点数";
23
+ readonly unlimited: "不限量";
24
+ readonly cacheHit: "缓存命中率";
25
+ readonly cacheRead: "缓存读取";
26
+ readonly poolPaused: "号池已暂停";
27
+ readonly quotaAvailable: "可用";
28
+ readonly quotaUsed: "已用";
29
+ readonly quotaGranted: "总额";
30
+ readonly quotaStale: "缓存";
31
+ readonly creditBucket: "额度池 #{index}";
32
+ readonly resetCredits: "重置券";
33
+ };
34
+ export type SessionQuotaLocaleKey = keyof typeof zh;
35
+ export declare const en: Record<SessionQuotaLocaleKey, string>;
36
+ export declare const dictionaries: {
37
+ zh: {
38
+ readonly sectionTitle: "订阅额度";
39
+ readonly refresh: "刷新";
40
+ readonly refreshing: "刷新中…";
41
+ readonly remaining: "剩余";
42
+ readonly resetInDaysHours: "{days} 天 {hours} 小时后重置";
43
+ readonly resetInHoursMinutes: "{hours} 小时 {minutes} 分钟后重置";
44
+ readonly resetInMinutes: "{minutes} 分钟后重置";
45
+ readonly resetSoon: "即将重置";
46
+ readonly resetAt: "{time} 重置";
47
+ readonly windowFiveHour: "5 小时限额";
48
+ readonly windowWeekly: "周限额";
49
+ readonly windowMonthly: "月限额";
50
+ readonly windowHours: "{count} 小时限额";
51
+ readonly windowDays: "{count} 天限额";
52
+ readonly windowMinutes: "{count} 分钟限额";
53
+ readonly planTier: "套餐档位";
54
+ readonly lastInput: "最近输入";
55
+ readonly lastOutput: "最近输出";
56
+ readonly balance: "剩余余额";
57
+ readonly credits: "剩余点数";
58
+ readonly unlimited: "不限量";
59
+ readonly cacheHit: "缓存命中率";
60
+ readonly cacheRead: "缓存读取";
61
+ readonly poolPaused: "号池已暂停";
62
+ readonly quotaAvailable: "可用";
63
+ readonly quotaUsed: "已用";
64
+ readonly quotaGranted: "总额";
65
+ readonly quotaStale: "缓存";
66
+ readonly creditBucket: "额度池 #{index}";
67
+ readonly resetCredits: "重置券";
68
+ };
69
+ en: Record<"quotaUsed" | "refreshing" | "remaining" | "unlimited" | "credits" | "resetCredits" | "resetAt" | "quotaStale" | "poolPaused" | "quotaAvailable" | "quotaGranted" | "refresh" | "sectionTitle" | "resetInDaysHours" | "resetInHoursMinutes" | "resetInMinutes" | "resetSoon" | "windowFiveHour" | "windowWeekly" | "windowMonthly" | "windowHours" | "windowDays" | "windowMinutes" | "planTier" | "lastInput" | "lastOutput" | "balance" | "cacheHit" | "cacheRead" | "creditBucket", string>;
70
+ };
71
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../../src/client/features/session-quota/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,sBAAsB,CAAA;AAEnD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BL,CAAA;AAEV,MAAM,MAAM,qBAAqB,GAAG,MAAM,OAAO,EAAE,CAAA;AAEnD,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CA+BpD,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAA"}
@@ -0,0 +1,41 @@
1
+ import type { SessionQuotaLocaleKey } from './locales.ts';
2
+ export type QuotaLevel = 'normal' | 'warning' | 'danger';
3
+ export interface QuotaBarItem {
4
+ key: string;
5
+ label: string;
6
+ /** Remaining share in [0, 100]. */
7
+ remainingPercent: number;
8
+ /** Human-readable reset countdown or clock text, when known. */
9
+ resetText?: string;
10
+ /** Optional secondary detail (e.g. absolute remaining credits). */
11
+ detailText?: string;
12
+ level: QuotaLevel;
13
+ }
14
+ export interface QuotaFactItem {
15
+ key: string;
16
+ label: string;
17
+ value: string;
18
+ level?: QuotaLevel;
19
+ }
20
+ export interface SessionQuotaSnapshot {
21
+ providerId: string;
22
+ providerName: string;
23
+ planBadge?: string;
24
+ /** Compact summary shown when the session panel section is folded. */
25
+ summaryText: string;
26
+ summaryLevel: QuotaLevel;
27
+ summaryPercent?: number | null;
28
+ bars: QuotaBarItem[];
29
+ facts: QuotaFactItem[];
30
+ note?: string;
31
+ }
32
+ export type SessionQuotaDict = Record<SessionQuotaLocaleKey, string>;
33
+ export declare function clampPercent(value: number): number;
34
+ /**
35
+ * Format a future reset timestamp (Unix ms, Unix seconds, or ISO string) as a
36
+ * compact countdown matching the session panel's narrow column.
37
+ */
38
+ export declare function formatResetCountdown(resetAt: number | string | null | undefined, dict: SessionQuotaDict, nowMs?: number): string | undefined;
39
+ /** Localize a window length in minutes to a concise limit label. */
40
+ export declare function formatWindowDurationLabel(minutes: number | null | undefined, fallback: string, dict: SessionQuotaDict): string;
41
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/client/features/session-quota/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEzD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;AAExD,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,mCAAmC;IACnC,gBAAgB,EAAE,MAAM,CAAA;IACxB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,UAAU,CAAA;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,UAAU,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,IAAI,EAAE,YAAY,EAAE,CAAA;IACpB,KAAK,EAAE,aAAa,EAAE,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA;AAEpE,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGlD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAC3C,IAAI,EAAE,gBAAgB,EACtB,KAAK,GAAE,MAAmB,GACzB,MAAM,GAAG,SAAS,CAiCpB;AAED,oEAAoE;AACpE,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,gBAAgB,GACrB,MAAM,CAcR"}
@@ -0,0 +1,10 @@
1
+ type Listener = () => void;
2
+ export declare function isSessionPanelQuotaActive(): boolean;
3
+ export declare function subscribeSessionPanelQuota(listener: Listener): () => void;
4
+ /** Mark one session-panel slot registration active; returns its release callback. */
5
+ export declare function acquireSessionPanelQuota(): () => void;
6
+ /** Test-only reset helper so a leaked registration cannot bleed across test files. */
7
+ export declare function resetSessionPanelQuotaForTest(): void;
8
+ export declare function useSessionPanelQuotaActive(): boolean;
9
+ export {};
10
+ //# sourceMappingURL=panel-availability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel-availability.d.ts","sourceRoot":"","sources":["../../../../../src/client/features/session-quota/panel-availability.ts"],"names":[],"mappings":"AAOA,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAA;AAe1B,wBAAgB,yBAAyB,IAAI,OAAO,CAEnD;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI,CAKzE;AAED,qFAAqF;AACrF,wBAAgB,wBAAwB,IAAI,MAAM,IAAI,CAWrD;AAED,sFAAsF;AACtF,wBAAgB,6BAA6B,IAAI,IAAI,CAIpD;AAED,wBAAgB,0BAA0B,IAAI,OAAO,CAMpD"}
@@ -0,0 +1,13 @@
1
+ import type { ModelDirectoryState } from '@deepseek-ai/dsh-client-ui-model-selection/client';
2
+ import type { SnapshotStore } from '../../providers/codex-chatgpt/store.ts';
3
+ import { type SessionQuotaAdapter } from './adapters.ts';
4
+ import type { SessionQuotaDict, SessionQuotaSnapshot } from './model.ts';
5
+ export interface SessionQuotaState {
6
+ snapshot: SessionQuotaSnapshot | null;
7
+ loading: boolean;
8
+ refresh: () => void;
9
+ }
10
+ export declare function useSessionQuota(directory: SnapshotStore<ModelDirectoryState>, loadModelDirectory: () => void, dict: SessionQuotaDict, adapters?: ReadonlyMap<string, SessionQuotaAdapter>): SessionQuotaState;
11
+ /** Test-only helper to clear cached provider entries between unit tests. */
12
+ export declare function resetSessionQuotaCacheForTest(): void;
13
+ //# sourceMappingURL=session-quota-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-quota-store.d.ts","sourceRoot":"","sources":["../../../../../src/client/features/session-quota/session-quota-store.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAE3E,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAmFxE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAA;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,wBAAgB,eAAe,CAC7B,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAC7C,kBAAkB,EAAE,MAAM,IAAI,EAC9B,IAAI,EAAE,gBAAgB,EACtB,QAAQ,GAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAA0B,GAC1E,iBAAiB,CA8CnB;AAED,4EAA4E;AAC5E,wBAAgB,6BAA6B,IAAI,IAAI,CAKpD"}
@@ -0,0 +1,2 @@
1
+ export declare function installSessionQuotaStyles(): () => void;
2
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/client/features/session-quota/styles.ts"],"names":[],"mappings":"AA+CA,wBAAgB,yBAAyB,IAAI,MAAM,IAAI,CAEtD"}
@@ -0,0 +1,17 @@
1
+ import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { HubProviderSummaryDto } from '../../shared/hub-contracts.ts';
3
+ import type { NS } from '../providers/codex-chatgpt/locales.ts';
4
+ import { type HubProviderDescriptor } from './providers.tsx';
5
+ type HubTranslate = PropsLocale<typeof NS>['t'];
6
+ interface HubAddSheetProps {
7
+ t: HubTranslate;
8
+ summaries: ReadonlyMap<string, HubProviderSummaryDto> | null;
9
+ hasExistingProviders: boolean;
10
+ query: string;
11
+ onQueryChange(value: string): void;
12
+ onSelect(descriptor: HubProviderDescriptor): void;
13
+ onClose(): void;
14
+ }
15
+ export declare function HubAddSheet({ t, summaries, hasExistingProviders, query, onQueryChange, onSelect, onClose, }: HubAddSheetProps): React.JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=HubAddSheet.d.ts.map