@eddyskywalker/dsh-chatgpt-subscription 0.3.9 → 0.5.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 (97) hide show
  1. package/CHANGELOG.md +51 -1
  2. package/lib/client.js +959 -503
  3. package/lib/client.js.map +1 -1
  4. package/lib/index.js +5592 -3670
  5. package/lib/types/client/CodexSubscriptionSection.d.ts +1 -1
  6. package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -1
  7. package/lib/types/client/antigravity/AntigravitySection.d.ts.map +1 -1
  8. package/lib/types/client/antigravity/locales.d.ts +63 -153
  9. package/lib/types/client/antigravity/locales.d.ts.map +1 -1
  10. package/lib/types/client/antigravity/styles.d.ts.map +1 -1
  11. package/lib/types/client/api.d.ts +13 -1
  12. package/lib/types/client/api.d.ts.map +1 -1
  13. package/lib/types/client/command-code/CommandCodeSection.d.ts.map +1 -1
  14. package/lib/types/client/command-code/locales.d.ts +72 -201
  15. package/lib/types/client/command-code/locales.d.ts.map +1 -1
  16. package/lib/types/client/common/AccountPoolSection.d.ts +41 -0
  17. package/lib/types/client/common/AccountPoolSection.d.ts.map +1 -0
  18. package/lib/types/client/common/account-pool-labels.d.ts +43 -0
  19. package/lib/types/client/common/account-pool-labels.d.ts.map +1 -0
  20. package/lib/types/client/common/styles.d.ts +11 -0
  21. package/lib/types/client/common/styles.d.ts.map +1 -0
  22. package/lib/types/client/index.d.ts.map +1 -1
  23. package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
  24. package/lib/types/client/kimi-code/locales.d.ts +69 -336
  25. package/lib/types/client/kimi-code/locales.d.ts.map +1 -1
  26. package/lib/types/client/locales.d.ts +49 -3
  27. package/lib/types/client/locales.d.ts.map +1 -1
  28. package/lib/types/host/antigravity/account-pool.d.ts +60 -0
  29. package/lib/types/host/antigravity/account-pool.d.ts.map +1 -0
  30. package/lib/types/host/antigravity/adapter.d.ts +3 -1
  31. package/lib/types/host/antigravity/adapter.d.ts.map +1 -1
  32. package/lib/types/host/antigravity/mapper.d.ts.map +1 -1
  33. package/lib/types/host/antigravity/oauth.d.ts +1 -1
  34. package/lib/types/host/antigravity/oauth.d.ts.map +1 -1
  35. package/lib/types/host/antigravity/routes.d.ts +3 -2
  36. package/lib/types/host/antigravity/routes.d.ts.map +1 -1
  37. package/lib/types/host/antigravity/token-store.d.ts +3 -0
  38. package/lib/types/host/antigravity/token-store.d.ts.map +1 -1
  39. package/lib/types/host/codex-account-pool.d.ts +64 -0
  40. package/lib/types/host/codex-account-pool.d.ts.map +1 -0
  41. package/lib/types/host/command-code/account-pool.d.ts +60 -0
  42. package/lib/types/host/command-code/account-pool.d.ts.map +1 -0
  43. package/lib/types/host/command-code/adapter.d.ts +11 -1
  44. package/lib/types/host/command-code/adapter.d.ts.map +1 -1
  45. package/lib/types/host/command-code/client.d.ts +17 -1
  46. package/lib/types/host/command-code/client.d.ts.map +1 -1
  47. package/lib/types/host/command-code/mapper.d.ts.map +1 -1
  48. package/lib/types/host/command-code/oauth.d.ts +4 -1
  49. package/lib/types/host/command-code/oauth.d.ts.map +1 -1
  50. package/lib/types/host/command-code/routes.d.ts +12 -3
  51. package/lib/types/host/command-code/routes.d.ts.map +1 -1
  52. package/lib/types/host/command-code/token-store.d.ts +3 -0
  53. package/lib/types/host/command-code/token-store.d.ts.map +1 -1
  54. package/lib/types/host/common/account-pool.d.ts +179 -0
  55. package/lib/types/host/common/account-pool.d.ts.map +1 -0
  56. package/lib/types/host/common/home.d.ts +8 -0
  57. package/lib/types/host/common/home.d.ts.map +1 -0
  58. package/lib/types/host/kimi-code/account-pool.d.ts +48 -0
  59. package/lib/types/host/kimi-code/account-pool.d.ts.map +1 -0
  60. package/lib/types/host/kimi-code/adapter.d.ts +10 -1
  61. package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
  62. package/lib/types/host/kimi-code/client.d.ts +16 -0
  63. package/lib/types/host/kimi-code/client.d.ts.map +1 -1
  64. package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
  65. package/lib/types/host/kimi-code/oauth.d.ts +2 -0
  66. package/lib/types/host/kimi-code/oauth.d.ts.map +1 -1
  67. package/lib/types/host/kimi-code/routes.d.ts +11 -3
  68. package/lib/types/host/kimi-code/routes.d.ts.map +1 -1
  69. package/lib/types/host/kimi-code/token-store.d.ts +3 -0
  70. package/lib/types/host/kimi-code/token-store.d.ts.map +1 -1
  71. package/lib/types/host/model-catalog.d.ts.map +1 -1
  72. package/lib/types/host/oauth-service.d.ts +41 -2
  73. package/lib/types/host/oauth-service.d.ts.map +1 -1
  74. package/lib/types/host/preferences.d.ts.map +1 -1
  75. package/lib/types/host/preset-sync.d.ts +7 -1
  76. package/lib/types/host/preset-sync.d.ts.map +1 -1
  77. package/lib/types/host/responses-client.d.ts +15 -0
  78. package/lib/types/host/responses-client.d.ts.map +1 -1
  79. package/lib/types/host/routes.d.ts +2 -1
  80. package/lib/types/host/routes.d.ts.map +1 -1
  81. package/lib/types/host/token-store-windows.d.ts.map +1 -1
  82. package/lib/types/host/usage-service.d.ts +15 -0
  83. package/lib/types/host/usage-service.d.ts.map +1 -1
  84. package/lib/types/index.d.ts +6 -0
  85. package/lib/types/index.d.ts.map +1 -1
  86. package/lib/types/shared/account-pool-contracts.d.ts +47 -0
  87. package/lib/types/shared/account-pool-contracts.d.ts.map +1 -0
  88. package/lib/types/shared/antigravity-contracts.d.ts +12 -0
  89. package/lib/types/shared/antigravity-contracts.d.ts.map +1 -1
  90. package/lib/types/shared/command-code-contracts.d.ts +16 -0
  91. package/lib/types/shared/command-code-contracts.d.ts.map +1 -1
  92. package/lib/types/shared/contracts.d.ts +8 -0
  93. package/lib/types/shared/contracts.d.ts.map +1 -1
  94. package/lib/types/shared/kimi-code-contracts.d.ts +16 -0
  95. package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -1
  96. package/lib/types/shared/preferences.d.ts.map +1 -1
  97. package/package.json +1 -1
@@ -37,7 +37,8 @@ export declare const zh: {
37
37
  readonly routeOwned: "模型路由由本插件提供";
38
38
  readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
39
39
  readonly modelsSection: "模型";
40
- readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;至少保留一个。";
40
+ readonly enableProvider: "启用此供应商";
41
+ readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;全部取消勾选或关闭上方开关可在列表中隐藏该供应商。";
41
42
  readonly refreshCatalog: "刷新模型目录";
42
43
  readonly refreshingCatalog: "刷新中...";
43
44
  readonly selectAll: "全选";
@@ -64,73 +65,29 @@ export declare const zh: {
64
65
  readonly loading: "加载中...";
65
66
  readonly loginFailed: "登录失败";
66
67
  readonly tokens: "tokens";
68
+ readonly accountPool: string;
69
+ readonly addAccount: string;
70
+ readonly accountCount: string;
71
+ readonly primaryAccount: string;
72
+ readonly activeAccount: string;
73
+ readonly setPrimary: string;
74
+ readonly deleteAccount: string;
75
+ readonly cooling: string;
76
+ readonly cooldownLeft: string;
77
+ readonly clearCooldown: string;
78
+ readonly needsRelogin: string;
79
+ readonly relogin: string;
80
+ readonly rotationStrategy: string;
81
+ readonly strategySequential: string;
82
+ readonly strategyRoundRobin: string;
83
+ readonly strategySticky: string;
84
+ readonly noAccounts: string;
85
+ readonly email: string;
86
+ readonly expires: string;
87
+ readonly lastUsed: string;
88
+ readonly accountId: string;
67
89
  };
68
- export declare const en: {
69
- readonly title: "Command Code";
70
- readonly pageDesc: "Sign in to Command Code and manage models, context windows, and quota.";
71
- readonly account: "Account";
72
- readonly signedIn: "Signed in";
73
- readonly signedOut: "Not signed in";
74
- readonly keyName: "Key name";
75
- readonly organization: "Organization";
76
- readonly plan: "Plan";
77
- readonly planUnknown: "—";
78
- readonly subscription: "Subscription";
79
- readonly renews: "renews";
80
- readonly authenticatedAt: "Signed in at";
81
- readonly storage: "Credential storage";
82
- readonly storageNotice: "The API key is stored locally by the Host ($DSH_HOME/storages/command-code-credentials.json) and never reaches the browser.";
83
- readonly signIn: "Sign in with browser";
84
- readonly signInAgain: "Sign in again";
85
- readonly signingIn: "Signing in...";
86
- readonly signOut: "Sign out";
87
- readonly cancelSignIn: "Cancel";
88
- readonly openSignInPage: "Open the sign-in page";
89
- readonly apiKeySection: "Paste an API key";
90
- readonly apiKeyHint: "Create a key in Command Code Studio and paste it here; use this when the browser flow is unavailable.";
91
- readonly apiKeyPlaceholder: "Command Code API key";
92
- readonly apiKeySave: "Save and verify";
93
- readonly apiKeySaving: "Verifying...";
94
- readonly apiKeySaved: "Saved";
95
- readonly connection: "Connection";
96
- readonly provider: "Provider";
97
- readonly providerValue: "Command Code · command-code";
98
- readonly connectionState: "Connection state";
99
- readonly connected: "Connected";
100
- readonly untested: "Untested";
101
- readonly testConnection: "Test connection";
102
- readonly testingConnection: "Testing...";
103
- readonly routeOwned: "This plugin serves the model route";
104
- readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
105
- readonly modelsSection: "Models";
106
- readonly modelsHint: "Checked models appear in the DSH conversation model list; keep at least one.";
107
- readonly refreshCatalog: "Refresh catalog";
108
- readonly refreshingCatalog: "Refreshing...";
109
- readonly selectAll: "Select all";
110
- readonly unselectAll: "Deselect all";
111
- readonly wireAnthropic: "Anthropic";
112
- readonly wireOpenai: "OpenAI";
113
- readonly enhanced: "Enhanced features";
114
- readonly defaultReasoningEffort: "Default reasoning effort";
115
- readonly defaultReasoningEffortHint: "Reasoning effort for models that support it when the conversation does not specify one. Anthropic models map it to a thinking budget.";
116
- readonly defaultEffortAuto: "Use provider default";
117
- readonly contextWindowSection: "Model context window";
118
- readonly contextWindowHint: "Defaults to the context length in the Command Code catalog; override it with the capacity DSH should use for compaction and overflow decisions (e.g., 1M, 512K, 200K).";
119
- readonly save: "Save";
120
- readonly saved: "Saved";
121
- readonly saving: "Saving...";
122
- readonly quotaSection: "Usage & quota";
123
- readonly quotaDesc: "Read from the Command Code account endpoints; refreshes at most once every 60 seconds while visible.";
124
- readonly refreshQuota: "Refresh quota";
125
- readonly refreshingQuota: "Refreshing...";
126
- readonly quotaEmpty: "No quota data yet — use “Refresh quota” to retry.";
127
- readonly quotaCredits: "Remaining credits";
128
- readonly quotaUnlimited: "Unlimited";
129
- readonly updatedAt: "Updated at: {time}";
130
- readonly loading: "Loading...";
131
- readonly loginFailed: "Sign-in failed";
132
- readonly tokens: "tokens";
133
- };
90
+ export declare const en: Record<keyof typeof zh, string>;
134
91
  export declare const dictionaries: {
135
92
  zh: {
136
93
  readonly title: "Command Code";
@@ -170,7 +127,8 @@ export declare const dictionaries: {
170
127
  readonly routeOwned: "模型路由由本插件提供";
171
128
  readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
172
129
  readonly modelsSection: "模型";
173
- readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;至少保留一个。";
130
+ readonly enableProvider: "启用此供应商";
131
+ readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;全部取消勾选或关闭上方开关可在列表中隐藏该供应商。";
174
132
  readonly refreshCatalog: "刷新模型目录";
175
133
  readonly refreshingCatalog: "刷新中...";
176
134
  readonly selectAll: "全选";
@@ -197,6 +155,27 @@ export declare const dictionaries: {
197
155
  readonly loading: "加载中...";
198
156
  readonly loginFailed: "登录失败";
199
157
  readonly tokens: "tokens";
158
+ readonly accountPool: string;
159
+ readonly addAccount: string;
160
+ readonly accountCount: string;
161
+ readonly primaryAccount: string;
162
+ readonly activeAccount: string;
163
+ readonly setPrimary: string;
164
+ readonly deleteAccount: string;
165
+ readonly cooling: string;
166
+ readonly cooldownLeft: string;
167
+ readonly clearCooldown: string;
168
+ readonly needsRelogin: string;
169
+ readonly relogin: string;
170
+ readonly rotationStrategy: string;
171
+ readonly strategySequential: string;
172
+ readonly strategyRoundRobin: string;
173
+ readonly strategySticky: string;
174
+ readonly noAccounts: string;
175
+ readonly email: string;
176
+ readonly expires: string;
177
+ readonly lastUsed: string;
178
+ readonly accountId: string;
200
179
  };
201
180
  'zh-CN': {
202
181
  readonly title: "Command Code";
@@ -236,7 +215,8 @@ export declare const dictionaries: {
236
215
  readonly routeOwned: "模型路由由本插件提供";
237
216
  readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
238
217
  readonly modelsSection: "模型";
239
- readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;至少保留一个。";
218
+ readonly enableProvider: "启用此供应商";
219
+ readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;全部取消勾选或关闭上方开关可在列表中隐藏该供应商。";
240
220
  readonly refreshCatalog: "刷新模型目录";
241
221
  readonly refreshingCatalog: "刷新中...";
242
222
  readonly selectAll: "全选";
@@ -263,139 +243,30 @@ export declare const dictionaries: {
263
243
  readonly loading: "加载中...";
264
244
  readonly loginFailed: "登录失败";
265
245
  readonly tokens: "tokens";
246
+ readonly accountPool: string;
247
+ readonly addAccount: string;
248
+ readonly accountCount: string;
249
+ readonly primaryAccount: string;
250
+ readonly activeAccount: string;
251
+ readonly setPrimary: string;
252
+ readonly deleteAccount: string;
253
+ readonly cooling: string;
254
+ readonly cooldownLeft: string;
255
+ readonly clearCooldown: string;
256
+ readonly needsRelogin: string;
257
+ readonly relogin: string;
258
+ readonly rotationStrategy: string;
259
+ readonly strategySequential: string;
260
+ readonly strategyRoundRobin: string;
261
+ readonly strategySticky: string;
262
+ readonly noAccounts: string;
263
+ readonly email: string;
264
+ readonly expires: string;
265
+ readonly lastUsed: string;
266
+ readonly accountId: string;
266
267
  };
267
- en: {
268
- readonly title: "Command Code";
269
- readonly pageDesc: "Sign in to Command Code and manage models, context windows, and quota.";
270
- readonly account: "Account";
271
- readonly signedIn: "Signed in";
272
- readonly signedOut: "Not signed in";
273
- readonly keyName: "Key name";
274
- readonly organization: "Organization";
275
- readonly plan: "Plan";
276
- readonly planUnknown: "—";
277
- readonly subscription: "Subscription";
278
- readonly renews: "renews";
279
- readonly authenticatedAt: "Signed in at";
280
- readonly storage: "Credential storage";
281
- readonly storageNotice: "The API key is stored locally by the Host ($DSH_HOME/storages/command-code-credentials.json) and never reaches the browser.";
282
- readonly signIn: "Sign in with browser";
283
- readonly signInAgain: "Sign in again";
284
- readonly signingIn: "Signing in...";
285
- readonly signOut: "Sign out";
286
- readonly cancelSignIn: "Cancel";
287
- readonly openSignInPage: "Open the sign-in page";
288
- readonly apiKeySection: "Paste an API key";
289
- readonly apiKeyHint: "Create a key in Command Code Studio and paste it here; use this when the browser flow is unavailable.";
290
- readonly apiKeyPlaceholder: "Command Code API key";
291
- readonly apiKeySave: "Save and verify";
292
- readonly apiKeySaving: "Verifying...";
293
- readonly apiKeySaved: "Saved";
294
- readonly connection: "Connection";
295
- readonly provider: "Provider";
296
- readonly providerValue: "Command Code · command-code";
297
- readonly connectionState: "Connection state";
298
- readonly connected: "Connected";
299
- readonly untested: "Untested";
300
- readonly testConnection: "Test connection";
301
- readonly testingConnection: "Testing...";
302
- readonly routeOwned: "This plugin serves the model route";
303
- readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
304
- readonly modelsSection: "Models";
305
- readonly modelsHint: "Checked models appear in the DSH conversation model list; keep at least one.";
306
- readonly refreshCatalog: "Refresh catalog";
307
- readonly refreshingCatalog: "Refreshing...";
308
- readonly selectAll: "Select all";
309
- readonly unselectAll: "Deselect all";
310
- readonly wireAnthropic: "Anthropic";
311
- readonly wireOpenai: "OpenAI";
312
- readonly enhanced: "Enhanced features";
313
- readonly defaultReasoningEffort: "Default reasoning effort";
314
- readonly defaultReasoningEffortHint: "Reasoning effort for models that support it when the conversation does not specify one. Anthropic models map it to a thinking budget.";
315
- readonly defaultEffortAuto: "Use provider default";
316
- readonly contextWindowSection: "Model context window";
317
- readonly contextWindowHint: "Defaults to the context length in the Command Code catalog; override it with the capacity DSH should use for compaction and overflow decisions (e.g., 1M, 512K, 200K).";
318
- readonly save: "Save";
319
- readonly saved: "Saved";
320
- readonly saving: "Saving...";
321
- readonly quotaSection: "Usage & quota";
322
- readonly quotaDesc: "Read from the Command Code account endpoints; refreshes at most once every 60 seconds while visible.";
323
- readonly refreshQuota: "Refresh quota";
324
- readonly refreshingQuota: "Refreshing...";
325
- readonly quotaEmpty: "No quota data yet — use “Refresh quota” to retry.";
326
- readonly quotaCredits: "Remaining credits";
327
- readonly quotaUnlimited: "Unlimited";
328
- readonly updatedAt: "Updated at: {time}";
329
- readonly loading: "Loading...";
330
- readonly loginFailed: "Sign-in failed";
331
- readonly tokens: "tokens";
332
- };
333
- 'en-US': {
334
- readonly title: "Command Code";
335
- readonly pageDesc: "Sign in to Command Code and manage models, context windows, and quota.";
336
- readonly account: "Account";
337
- readonly signedIn: "Signed in";
338
- readonly signedOut: "Not signed in";
339
- readonly keyName: "Key name";
340
- readonly organization: "Organization";
341
- readonly plan: "Plan";
342
- readonly planUnknown: "—";
343
- readonly subscription: "Subscription";
344
- readonly renews: "renews";
345
- readonly authenticatedAt: "Signed in at";
346
- readonly storage: "Credential storage";
347
- readonly storageNotice: "The API key is stored locally by the Host ($DSH_HOME/storages/command-code-credentials.json) and never reaches the browser.";
348
- readonly signIn: "Sign in with browser";
349
- readonly signInAgain: "Sign in again";
350
- readonly signingIn: "Signing in...";
351
- readonly signOut: "Sign out";
352
- readonly cancelSignIn: "Cancel";
353
- readonly openSignInPage: "Open the sign-in page";
354
- readonly apiKeySection: "Paste an API key";
355
- readonly apiKeyHint: "Create a key in Command Code Studio and paste it here; use this when the browser flow is unavailable.";
356
- readonly apiKeyPlaceholder: "Command Code API key";
357
- readonly apiKeySave: "Save and verify";
358
- readonly apiKeySaving: "Verifying...";
359
- readonly apiKeySaved: "Saved";
360
- readonly connection: "Connection";
361
- readonly provider: "Provider";
362
- readonly providerValue: "Command Code · command-code";
363
- readonly connectionState: "Connection state";
364
- readonly connected: "Connected";
365
- readonly untested: "Untested";
366
- readonly testConnection: "Test connection";
367
- readonly testingConnection: "Testing...";
368
- readonly routeOwned: "This plugin serves the model route";
369
- readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
370
- readonly modelsSection: "Models";
371
- readonly modelsHint: "Checked models appear in the DSH conversation model list; keep at least one.";
372
- readonly refreshCatalog: "Refresh catalog";
373
- readonly refreshingCatalog: "Refreshing...";
374
- readonly selectAll: "Select all";
375
- readonly unselectAll: "Deselect all";
376
- readonly wireAnthropic: "Anthropic";
377
- readonly wireOpenai: "OpenAI";
378
- readonly enhanced: "Enhanced features";
379
- readonly defaultReasoningEffort: "Default reasoning effort";
380
- readonly defaultReasoningEffortHint: "Reasoning effort for models that support it when the conversation does not specify one. Anthropic models map it to a thinking budget.";
381
- readonly defaultEffortAuto: "Use provider default";
382
- readonly contextWindowSection: "Model context window";
383
- readonly contextWindowHint: "Defaults to the context length in the Command Code catalog; override it with the capacity DSH should use for compaction and overflow decisions (e.g., 1M, 512K, 200K).";
384
- readonly save: "Save";
385
- readonly saved: "Saved";
386
- readonly saving: "Saving...";
387
- readonly quotaSection: "Usage & quota";
388
- readonly quotaDesc: "Read from the Command Code account endpoints; refreshes at most once every 60 seconds while visible.";
389
- readonly refreshQuota: "Refresh quota";
390
- readonly refreshingQuota: "Refreshing...";
391
- readonly quotaEmpty: "No quota data yet — use “Refresh quota” to retry.";
392
- readonly quotaCredits: "Remaining credits";
393
- readonly quotaUnlimited: "Unlimited";
394
- readonly updatedAt: "Updated at: {time}";
395
- readonly loading: "Loading...";
396
- readonly loginFailed: "Sign-in failed";
397
- readonly tokens: "tokens";
398
- };
268
+ en: Record<"tokens" | "title" | "pageDesc" | "account" | "signedIn" | "signedOut" | "accountPool" | "addAccount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "clearCooldown" | "rotationStrategy" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "plan" | "accountId" | "expires" | "storage" | "storageNotice" | "signInAgain" | "signOut" | "signIn" | "signingIn" | "connection" | "provider" | "providerValue" | "connectionState" | "connected" | "untested" | "enableProvider" | "modelsHint" | "selectAll" | "unselectAll" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "save" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshQuota" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loading" | "loginFailed" | "keyName" | "organization" | "planUnknown" | "subscription" | "renews" | "authenticatedAt" | "cancelSignIn" | "openSignInPage" | "apiKeySection" | "apiKeyHint" | "apiKeyPlaceholder" | "apiKeySave" | "apiKeySaving" | "apiKeySaved" | "testConnection" | "testingConnection" | "routeOwned" | "routeConflict" | "modelsSection" | "refreshCatalog" | "refreshingCatalog" | "wireAnthropic" | "wireOpenai" | "quotaCredits" | "quotaUnlimited" | "accountCount" | "cooldownLeft" | "needsRelogin" | "relogin" | "email" | "lastUsed", string>;
269
+ 'en-US': Record<"tokens" | "title" | "pageDesc" | "account" | "signedIn" | "signedOut" | "accountPool" | "addAccount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "clearCooldown" | "rotationStrategy" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "plan" | "accountId" | "expires" | "storage" | "storageNotice" | "signInAgain" | "signOut" | "signIn" | "signingIn" | "connection" | "provider" | "providerValue" | "connectionState" | "connected" | "untested" | "enableProvider" | "modelsHint" | "selectAll" | "unselectAll" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "save" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshQuota" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loading" | "loginFailed" | "keyName" | "organization" | "planUnknown" | "subscription" | "renews" | "authenticatedAt" | "cancelSignIn" | "openSignInPage" | "apiKeySection" | "apiKeyHint" | "apiKeyPlaceholder" | "apiKeySave" | "apiKeySaving" | "apiKeySaved" | "testConnection" | "testingConnection" | "routeOwned" | "routeConflict" | "modelsSection" | "refreshCatalog" | "refreshingCatalog" | "wireAnthropic" | "wireOpenai" | "quotaCredits" | "quotaUnlimited" | "accountCount" | "cooldownLeft" | "needsRelogin" | "relogin" | "email" | "lastUsed", string>;
399
270
  };
400
271
  export type CommandCodeLocaleKey = keyof typeof zh;
401
272
  //# sourceMappingURL=locales.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/command-code/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,qBAAqB,CAAA;AAEjD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEL,CAAA;AAEV,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEL,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/command-code/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,qBAAqB,CAAA;AAEjD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEL,CAAA;AAEV,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAmErC,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,EAAE,CAAA"}
@@ -0,0 +1,41 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import type { AccountPoolStatusDto, AccountRotationStrategy, PoolAccountSummaryDto } from '../../shared/account-pool-contracts.ts';
3
+ import { type AccountPoolLabels } from './account-pool-labels.ts';
4
+ export type { AccountPoolLabels } from './account-pool-labels.ts';
5
+ export interface AccountPoolSectionProps<TAccount extends PoolAccountSummaryDto = PoolAccountSummaryDto> extends Omit<Pick<AccountPoolStatusDto, 'activeAccountId' | 'rotationStrategy'>, 'accounts'> {
6
+ accounts: TAccount[];
7
+ /** Label set of the hosting tab; see {@link AccountPoolLabels}. */
8
+ labels: AccountPoolLabels;
9
+ /** Action currently in flight, used to disable every control at once. */
10
+ busy: string | null;
11
+ /** Overrides the login button text while a sign-in flow is running. */
12
+ loginBusyLabel?: string;
13
+ onLogin(): void;
14
+ onSetPrimary(accountId: string): void;
15
+ onDelete(accountId: string): void;
16
+ onClearCooldown(accountId: string): void;
17
+ /** Offered on an account whose credential no longer authenticates. */
18
+ onRelogin?(accountId: string): void;
19
+ onSetStrategy(strategy: AccountRotationStrategy): void;
20
+ /** Provider-specific detail rows, rendered before the shared ones. */
21
+ renderDetails?(account: TAccount): ReactNode;
22
+ /** Value shown beside the storage label; defaults to a generic description. */
23
+ storageValue?: string;
24
+ /** Extra controls inside the group, after the account list. */
25
+ children?: ReactNode;
26
+ }
27
+ /** Format one account timestamp the way every tab renders it. */
28
+ export declare function formatAccountDate(ms?: number): string;
29
+ /** Whole minutes left in a cooldown, never below one. */
30
+ export declare function cooldownMinutesLeft(cooldownUntil: number, now?: number): number;
31
+ /** Whether one account currently carries a live 429 cooldown. */
32
+ export declare function isCoolingDown(account: PoolAccountSummaryDto, now?: number): boolean;
33
+ /**
34
+ * The account-management group every provider tab renders.
35
+ *
36
+ * One component rather than four near-identical blocks: the account card, its
37
+ * badges, the rotation-strategy picker and the storage notice are identical
38
+ * across providers, and only the identity details differ.
39
+ */
40
+ export declare function AccountPoolSection<TAccount extends PoolAccountSummaryDto = PoolAccountSummaryDto>(props: AccountPoolSectionProps<TAccount>): React.ReactElement;
41
+ //# sourceMappingURL=AccountPoolSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountPoolSection.d.ts","sourceRoot":"","sources":["../../../../src/client/common/AccountPoolSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAElF,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,MAAM,WAAW,uBAAuB,CACtC,QAAQ,SAAS,qBAAqB,GAAG,qBAAqB,CAC9D,SAAQ,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,iBAAiB,GAAG,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAC5F,QAAQ,EAAE,QAAQ,EAAE,CAAA;IACpB,mEAAmE;IACnE,MAAM,EAAE,iBAAiB,CAAA;IACzB,yEAAyE;IACzE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,uEAAuE;IACvE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,OAAO,IAAI,IAAI,CAAA;IACf,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxC,sEAAsE;IACtE,SAAS,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,aAAa,CAAC,QAAQ,EAAE,uBAAuB,GAAG,IAAI,CAAA;IACtD,sEAAsE;IACtE,aAAa,CAAC,CAAC,OAAO,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC5C,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,iEAAiE;AACjE,wBAAgB,iBAAiB,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAOrD;AAED,yDAAyD;AACzD,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,MAAM,CAEnF;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CAAC,OAAO,EAAE,qBAAqB,EAAE,GAAG,SAAa,GAAG,OAAO,CAEvF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,SAAS,qBAAqB,GAAG,qBAAqB,EAC/F,KAAK,EAAE,uBAAuB,CAAC,QAAQ,CAAC,GACvC,KAAK,CAAC,YAAY,CAqIpB"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Labels every provider tab's account-pool card renders.
3
+ *
4
+ * They live here rather than in each provider's locale file so the four tabs
5
+ * cannot drift apart in wording, ordering or meaning. The active locale is the
6
+ * one the host already selects per provider; each `locales.ts` spreads the set
7
+ * it needs and may override individual keys.
8
+ */
9
+ /** Labels the shared card needs, in the order its markup uses them. */
10
+ export interface AccountPoolLabels {
11
+ accountPool: string;
12
+ addAccount: string;
13
+ /** `{count}` is replaced with the number of signed-in accounts. */
14
+ accountCount: string;
15
+ primaryAccount: string;
16
+ activeAccount: string;
17
+ setPrimary: string;
18
+ deleteAccount: string;
19
+ cooling: string;
20
+ /** `{minutes}` is replaced with the remaining cooldown in whole minutes. */
21
+ cooldownLeft: string;
22
+ clearCooldown: string;
23
+ needsRelogin: string;
24
+ relogin: string;
25
+ rotationStrategy: string;
26
+ strategySequential: string;
27
+ strategyRoundRobin: string;
28
+ strategySticky: string;
29
+ noAccounts: string;
30
+ storage: string;
31
+ storageNotice: string;
32
+ email: string;
33
+ expires: string;
34
+ lastUsed: string;
35
+ accountId: string;
36
+ }
37
+ /** Chinese labels; the wording the Antigravity card shipped with. */
38
+ export declare const accountPoolZh: AccountPoolLabels;
39
+ /** English labels for the ChatGPT tab, which is the bilingual one. */
40
+ export declare const accountPoolEn: AccountPoolLabels;
41
+ /** Replace `{name}` placeholders in one label. */
42
+ export declare function formatPoolLabel(template: string, values: Record<string, string | number>): string;
43
+ //# sourceMappingURL=account-pool-labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-pool-labels.d.ts","sourceRoot":"","sources":["../../../../src/client/common/account-pool-labels.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,mEAAmE;IACnE,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB,EAAE,MAAM,CAAA;IACxB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,qEAAqE;AACrE,eAAO,MAAM,aAAa,EAAE,iBAwB3B,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,aAAa,EAAE,iBAwB3B,CAAA;AAED,kDAAkD;AAClD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAIjG"}
@@ -0,0 +1,11 @@
1
+ export declare const POOL_STYLE_ID = "dsh-provider-pool-style";
2
+ /**
3
+ * Styles the shared account-pool card adds on top of the existing provider
4
+ * stylesheets: the badge variants no single provider tab owned before.
5
+ *
6
+ * Additive on purpose — the shared `.dsha-*` block and each provider's own
7
+ * tweaks keep living in their own modules, in the order the client installs
8
+ * them, so nothing that already rendered changes appearance.
9
+ */
10
+ export declare function installPoolStyles(): void;
11
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/common/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,4BAA4B,CAAA;AAEtD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CASxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAenE,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAY/D,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,0BAA0B,EAAE,SAAS,CAAA;QACrC,iBAAiB,EAAE,GAAG,CAAA;QACtB,kBAAkB,EAAE,GAAG,CAAA;QACvB,eAAe,EAAE,GAAG,CAAA;KACrB;CACF;AAED,eAAO,MAAM,MAAM,UAA0D,CAAA;AAE7E,wBAAgB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAoH9C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAenE,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAa/D,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,0BAA0B,EAAE,SAAS,CAAA;QACrC,iBAAiB,EAAE,GAAG,CAAA;QACtB,kBAAkB,EAAE,GAAG,CAAA;QACvB,eAAe,EAAE,GAAG,CAAA;KACrB;CACF;AAED,eAAO,MAAM,MAAM,UAA0D,CAAA;AAE7E,wBAAgB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CA0H9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"KimiCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/KimiCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAa/D,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AAiBD,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOlE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;AAyCD,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CA8lBhG"}
1
+ {"version":3,"file":"KimiCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/KimiCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAe/D,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AAiBD,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOlE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;AAyCD,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAinBhG"}