@eddyskywalker/dsh-chatgpt-subscription 0.84.0 → 0.86.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.
- package/lib/client.js +3319 -671
- package/lib/client.js.map +1 -1
- package/lib/index.js +70 -21
- package/lib/types/client/common/ComposerQuotaBadge.d.ts.map +1 -1
- package/lib/types/client/common/ModelChecklist.d.ts +33 -1
- package/lib/types/client/common/ModelChecklist.d.ts.map +1 -1
- package/lib/types/client/common/model-checklist-labels.d.ts +31 -0
- package/lib/types/client/common/model-checklist-labels.d.ts.map +1 -0
- package/lib/types/client/common/model-checklist-styles.d.ts.map +1 -1
- package/lib/types/client/common/model-vendors.d.ts +30 -0
- package/lib/types/client/common/model-vendors.d.ts.map +1 -0
- package/lib/types/client/features/session-quota/SessionQuotaSection.d.ts +22 -0
- package/lib/types/client/features/session-quota/SessionQuotaSection.d.ts.map +1 -0
- package/lib/types/client/features/session-quota/adapters.d.ts +42 -0
- package/lib/types/client/features/session-quota/adapters.d.ts.map +1 -0
- package/lib/types/client/features/session-quota/index.d.ts +13 -0
- package/lib/types/client/features/session-quota/index.d.ts.map +1 -0
- package/lib/types/client/features/session-quota/locales.d.ts +71 -0
- package/lib/types/client/features/session-quota/locales.d.ts.map +1 -0
- package/lib/types/client/features/session-quota/model.d.ts +41 -0
- package/lib/types/client/features/session-quota/model.d.ts.map +1 -0
- package/lib/types/client/features/session-quota/panel-availability.d.ts +10 -0
- package/lib/types/client/features/session-quota/panel-availability.d.ts.map +1 -0
- package/lib/types/client/features/session-quota/session-quota-store.d.ts +13 -0
- package/lib/types/client/features/session-quota/session-quota-store.d.ts.map +1 -0
- package/lib/types/client/features/session-quota/styles.d.ts +2 -0
- package/lib/types/client/features/session-quota/styles.d.ts.map +1 -0
- package/lib/types/client/hub/HubAddSheet.d.ts +17 -0
- package/lib/types/client/hub/HubAddSheet.d.ts.map +1 -0
- package/lib/types/client/hub/HubOverview.d.ts +16 -11
- package/lib/types/client/hub/HubOverview.d.ts.map +1 -1
- package/lib/types/client/hub/HubProviderRow.d.ts +34 -0
- package/lib/types/client/hub/HubProviderRow.d.ts.map +1 -0
- package/lib/types/client/hub/ProviderHubSection.d.ts.map +1 -1
- package/lib/types/client/hub/brand-icons.d.ts +4 -2
- package/lib/types/client/hub/brand-icons.d.ts.map +1 -1
- package/lib/types/client/hub/hub-overview-helpers.d.ts +29 -0
- package/lib/types/client/hub/hub-overview-helpers.d.ts.map +1 -0
- package/lib/types/client/hub/hub-styles.d.ts.map +1 -1
- package/lib/types/client/hub/providers.d.ts +3 -0
- package/lib/types/client/hub/providers.d.ts.map +1 -1
- package/lib/types/client/index.d.ts +4 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/locales-ru/command-code.d.ts.map +1 -1
- package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
- package/lib/types/client/locales-ru/index.d.ts.map +1 -1
- package/lib/types/client/locales-ru/model-checklist.d.ts +4 -0
- package/lib/types/client/locales-ru/model-checklist.d.ts.map +1 -0
- package/lib/types/client/locales-ru/session-quota.d.ts +3 -0
- package/lib/types/client/locales-ru/session-quota.d.ts.map +1 -0
- package/lib/types/client/providers/antigravity-acp/AntigravityAcpSection.d.ts.map +1 -1
- package/lib/types/client/providers/cline-pass/ClinePassSection.d.ts.map +1 -1
- package/lib/types/client/providers/codex-chatgpt/CodexComposerQuota.d.ts.map +1 -1
- package/lib/types/client/providers/codex-chatgpt/locales.d.ts +67 -1
- package/lib/types/client/providers/codex-chatgpt/locales.d.ts.map +1 -1
- package/lib/types/client/providers/command-code/CommandCodeSection.d.ts.map +1 -1
- package/lib/types/client/providers/command-code/locales.d.ts +20 -2
- package/lib/types/client/providers/command-code/locales.d.ts.map +1 -1
- package/lib/types/client/providers/command-code/model-vendors.d.ts +5 -0
- package/lib/types/client/providers/command-code/model-vendors.d.ts.map +1 -0
- package/lib/types/client/providers/ollama/OllamaSection.d.ts.map +1 -1
- package/lib/types/client/providers/opendesign/OpenDesignSection.d.ts.map +1 -1
- package/lib/types/client/providers/qianwen-token-plan/useQianwenSection.d.ts +1 -0
- package/lib/types/client/providers/qianwen-token-plan/useQianwenSection.d.ts.map +1 -1
- package/lib/types/client/providers/qoder/QoderSection.d.ts.map +1 -1
- package/lib/types/client/providers/qoder/useQoderSection.d.ts +1 -0
- package/lib/types/client/providers/qoder/useQoderSection.d.ts.map +1 -1
- package/lib/types/client/providers/relayone/useRelayOneSection.d.ts +1 -0
- package/lib/types/client/providers/relayone/useRelayOneSection.d.ts.map +1 -1
- package/lib/types/client/providers/workbuddy/WorkBuddySection.d.ts.map +1 -1
- package/lib/types/client/providers/workbuddy/useWorkBuddySection.d.ts +1 -0
- package/lib/types/client/providers/workbuddy/useWorkBuddySection.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/hub-contracts.d.ts +4 -0
- package/lib/types/shared/hub-contracts.d.ts.map +1 -1
- 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.
|
|
843
|
+
const PLUGIN_VERSION = "0.86.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:
|
|
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:
|
|
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:
|
|
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
|
|
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:
|
|
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;
|
|
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;AAIxE,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,UA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C,OAAO,CAsCvI"}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
import { type ProviderMarkKey } from '../hub/brand-icons.tsx';
|
|
2
|
+
import { type ModelVendorOptions } from './model-vendors.ts';
|
|
3
|
+
export interface ModelChecklistGroup {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
mark?: ProviderMarkKey | null;
|
|
7
|
+
}
|
|
1
8
|
export interface ModelChecklistItem {
|
|
2
9
|
id: string;
|
|
3
10
|
name: string;
|
|
4
11
|
/** One quiet line under the name (e.g. the context window); omit when none. */
|
|
5
12
|
hint?: string;
|
|
6
13
|
enabled: boolean;
|
|
14
|
+
/** Optional vendor/category group. Two or more distinct groups activate split view. */
|
|
15
|
+
group?: ModelChecklistGroup;
|
|
7
16
|
}
|
|
8
17
|
export interface ModelChecklistLabels {
|
|
9
18
|
selectAll: string;
|
|
@@ -15,6 +24,16 @@ export interface ModelChecklistLabels {
|
|
|
15
24
|
countTemplate?: string;
|
|
16
25
|
/** aria-label of the list itself; omit when the section header already names it. */
|
|
17
26
|
list?: string;
|
|
27
|
+
/** Label for the "All" tab in split-pane vendor mode. */
|
|
28
|
+
allGroups?: string;
|
|
29
|
+
/** Label for the "Enabled" tab in split-pane vendor mode. */
|
|
30
|
+
enabledGroup?: string;
|
|
31
|
+
/** Search input placeholder in split-pane vendor mode. */
|
|
32
|
+
searchPlaceholder?: string;
|
|
33
|
+
/** Empty-state text when a search matches nothing. */
|
|
34
|
+
noMatches?: string;
|
|
35
|
+
/** aria-label for the left vendor tablist in split-pane mode. */
|
|
36
|
+
groupsNav?: string;
|
|
18
37
|
}
|
|
19
38
|
interface Props {
|
|
20
39
|
items: ModelChecklistItem[];
|
|
@@ -22,8 +41,21 @@ interface Props {
|
|
|
22
41
|
busy: boolean;
|
|
23
42
|
onToggle(id: string, enabled: boolean): void;
|
|
24
43
|
onToggleAll(enabled: boolean): void;
|
|
44
|
+
/** Optional batch toggle for the active vendor group in split-pane mode. */
|
|
45
|
+
onToggleGroup?(ids: string[], enabled: boolean): void;
|
|
46
|
+
/**
|
|
47
|
+
* Resolve each item's vendor from its id (items that already carry a `group`
|
|
48
|
+
* keep it). Two or more vendors switch the list to the split view, but only
|
|
49
|
+
* once the catalog reaches `minItems` (default 10): a short list reads better flat.
|
|
50
|
+
*/
|
|
51
|
+
groupByVendor?: boolean | ModelChecklistGrouping;
|
|
25
52
|
labels: ModelChecklistLabels;
|
|
26
53
|
}
|
|
27
|
-
export
|
|
54
|
+
export interface ModelChecklistGrouping extends ModelVendorOptions {
|
|
55
|
+
/** Smallest catalog that gets the split view; default {@link DEFAULT_GROUP_MIN_ITEMS}. */
|
|
56
|
+
minItems?: number;
|
|
57
|
+
}
|
|
58
|
+
export declare const DEFAULT_GROUP_MIN_ITEMS = 10;
|
|
59
|
+
export declare function ModelChecklist({ items: rawItems, busy, onToggle, onToggleAll, onToggleGroup, groupByVendor, labels }: Props): React.JSX.Element;
|
|
28
60
|
export {};
|
|
29
61
|
//# sourceMappingURL=ModelChecklist.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelChecklist.d.ts","sourceRoot":"","sources":["../../../../src/client/common/ModelChecklist.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModelChecklist.d.ts","sourceRoot":"","sources":["../../../../src/client/common/ModelChecklist.tsx"],"names":[],"mappings":"AAcA,OAAO,EAA6B,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAGxF,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE9E,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,+EAA+E;IAC/E,IA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E,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAsN/I"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy of the shared model checklist's split vendor view.
|
|
3
|
+
*
|
|
4
|
+
* The checklist owns this namespace so every provider line gets the same
|
|
5
|
+
* vendor-view wording without carrying its own copy of these keys; a line may
|
|
6
|
+
* still override any label through the checklist's `labels` prop.
|
|
7
|
+
*/
|
|
8
|
+
export declare const NS_MODEL_CHECKLIST = "dsh-model-checklist";
|
|
9
|
+
declare const zh: {
|
|
10
|
+
allGroups: string;
|
|
11
|
+
enabledGroup: string;
|
|
12
|
+
otherGroup: string;
|
|
13
|
+
searchPlaceholder: string;
|
|
14
|
+
noMatches: string;
|
|
15
|
+
groupsNav: string;
|
|
16
|
+
};
|
|
17
|
+
export type ModelChecklistLocaleKey = keyof typeof zh;
|
|
18
|
+
export declare const modelChecklistZh: Record<ModelChecklistLocaleKey, string>;
|
|
19
|
+
export declare const dictionaries: {
|
|
20
|
+
zh: {
|
|
21
|
+
allGroups: string;
|
|
22
|
+
enabledGroup: string;
|
|
23
|
+
otherGroup: string;
|
|
24
|
+
searchPlaceholder: string;
|
|
25
|
+
noMatches: string;
|
|
26
|
+
groupsNav: string;
|
|
27
|
+
};
|
|
28
|
+
en: Record<"allGroups" | "enabledGroup" | "otherGroup" | "searchPlaceholder" | "noMatches" | "groupsNav", string>;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=model-checklist-labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-checklist-labels.d.ts","sourceRoot":"","sources":["../../../../src/client/common/model-checklist-labels.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,wBAAwB,CAAA;AAEvD,QAAA,MAAM,EAAE;;;;;;;CAOP,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,EAAE,CAAA;AAWrD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAAM,CAAA;AAE3E,eAAO,MAAM,YAAY;;;;;;;;;;CAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-checklist-styles.d.ts","sourceRoot":"","sources":["../../../../src/client/common/model-checklist-styles.ts"],"names":[],"mappings":"
|
|
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,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves which vendor made a model, from its id alone, so any provider's
|
|
3
|
+
* model checklist can group a mixed catalog into the split vendor view.
|
|
4
|
+
*
|
|
5
|
+
* Order of evidence: a known `vendor/` prefix, then the model family of the
|
|
6
|
+
* last path segment (`qwen3.8-max`, `hy4`, `llama3.1:8b`), then an unknown
|
|
7
|
+
* prefix title-cased as its own vendor, and finally the caller's "other" bucket.
|
|
8
|
+
*/
|
|
9
|
+
import type { ModelChecklistGroup } from './ModelChecklist.tsx';
|
|
10
|
+
export interface ModelVendorOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Leading path segments that name the line itself rather than a vendor
|
|
13
|
+
* (`cline-pass/qwen3.8-max`); they are skipped before the vendor is read.
|
|
14
|
+
*/
|
|
15
|
+
ignorePrefixes?: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The display vendor of one model id.
|
|
19
|
+
*
|
|
20
|
+
* @param modelId - the model id as the line's catalog lists it.
|
|
21
|
+
* @param otherLabel - label of the bucket for ids no rule claims.
|
|
22
|
+
* @param options - line-specific prefixes to skip.
|
|
23
|
+
*/
|
|
24
|
+
export declare function modelVendorGroup(modelId: string, otherLabel: string, options?: ModelVendorOptions): ModelChecklistGroup;
|
|
25
|
+
/**
|
|
26
|
+
* The enabled-id list after a whole vendor group is switched on or off,
|
|
27
|
+
* keeping the caller's existing order and every id outside the group.
|
|
28
|
+
*/
|
|
29
|
+
export declare function nextGroupSelection(currentEnabled: readonly string[], groupIds: readonly string[], enabled: boolean): string[];
|
|
30
|
+
//# sourceMappingURL=model-vendors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-vendors.d.ts","sourceRoot":"","sources":["../../../../src/client/common/model-vendors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAiH/D,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACnC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,mBAAmB,CAkB3H;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAI7H"}
|
|
@@ -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,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAClF,OAAO,EAAkC,KAAK,gBAAgB,EAAE,MAAM,iDAAiD,CAAA;AACvH,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAC3F,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACpG,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AACtG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAmBhF,OAAO,EAML,KAA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,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"}
|