@eddyskywalker/dsh-chatgpt-subscription 0.12.6 → 0.13.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/CHANGELOG.md +637 -619
- package/lib/client.js +3975 -4521
- package/lib/client.js.map +1 -1
- package/lib/index.js +1146 -299
- package/lib/types/client/CodexComposerQuota.d.ts.map +1 -1
- package/lib/types/client/CodexSubscriptionSection.d.ts +1 -3
- package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -1
- package/lib/types/client/ProviderHubSection.d.ts +6 -5
- package/lib/types/client/ProviderHubSection.d.ts.map +1 -1
- package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts +22 -1
- package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts.map +1 -1
- package/lib/types/client/antigravity/AntigravitySection.d.ts +0 -2
- package/lib/types/client/antigravity/AntigravitySection.d.ts.map +1 -1
- package/lib/types/client/antigravity/locales.d.ts +33 -26
- package/lib/types/client/antigravity/locales.d.ts.map +1 -1
- package/lib/types/client/antigravity/styles.d.ts.map +1 -1
- package/lib/types/client/claude/ClaudeComposerQuota.d.ts +3 -7
- package/lib/types/client/claude/ClaudeComposerQuota.d.ts.map +1 -1
- package/lib/types/client/claude/ClaudeSection.d.ts +10 -9
- package/lib/types/client/claude/ClaudeSection.d.ts.map +1 -1
- package/lib/types/client/claude/locales.d.ts +29 -29
- package/lib/types/client/claude/locales.d.ts.map +1 -1
- package/lib/types/client/claude/useClaudeSection.d.ts +93 -0
- package/lib/types/client/claude/useClaudeSection.d.ts.map +1 -0
- package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts +3 -7
- package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts.map +1 -1
- package/lib/types/client/command-code/CommandCodeSection.d.ts +0 -3
- package/lib/types/client/command-code/CommandCodeSection.d.ts.map +1 -1
- package/lib/types/client/command-code/locales.d.ts +32 -29
- package/lib/types/client/command-code/locales.d.ts.map +1 -1
- package/lib/types/client/common/AccountPoolSection.d.ts +16 -4
- package/lib/types/client/common/AccountPoolSection.d.ts.map +1 -1
- package/lib/types/client/common/ComposerQuotaBadge.d.ts +35 -0
- package/lib/types/client/common/ComposerQuotaBadge.d.ts.map +1 -0
- package/lib/types/client/common/ContextWindowEditor.d.ts +69 -0
- package/lib/types/client/common/ContextWindowEditor.d.ts.map +1 -0
- package/lib/types/client/common/ModelChecklist.d.ts +29 -0
- package/lib/types/client/common/ModelChecklist.d.ts.map +1 -0
- package/lib/types/client/common/account-pool-labels.d.ts +18 -2
- package/lib/types/client/common/account-pool-labels.d.ts.map +1 -1
- package/lib/types/client/common/account-quota.d.ts +60 -0
- package/lib/types/client/common/account-quota.d.ts.map +1 -0
- package/lib/types/client/common/format.d.ts +30 -0
- package/lib/types/client/common/format.d.ts.map +1 -0
- package/lib/types/client/common/line-api.d.ts +8 -0
- package/lib/types/client/common/line-api.d.ts.map +1 -0
- package/lib/types/client/common/model-checklist-styles.d.ts +2 -0
- package/lib/types/client/common/model-checklist-styles.d.ts.map +1 -0
- package/lib/types/client/common/styles.d.ts.map +1 -1
- package/lib/types/client/common/use-store.d.ts +3 -0
- package/lib/types/client/common/use-store.d.ts.map +1 -0
- package/lib/types/client/hub/HubOverview.d.ts +14 -0
- package/lib/types/client/hub/HubOverview.d.ts.map +1 -0
- package/lib/types/client/hub/brand-icons.d.ts +46 -0
- package/lib/types/client/hub/brand-icons.d.ts.map +1 -0
- package/lib/types/client/hub/brand-svg.d.ts +51 -0
- package/lib/types/client/hub/brand-svg.d.ts.map +1 -0
- package/lib/types/client/hub/hub-styles.d.ts +2 -0
- package/lib/types/client/hub/hub-styles.d.ts.map +1 -0
- package/lib/types/client/hub/providers.d.ts +38 -0
- package/lib/types/client/hub/providers.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +20 -6
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts +3 -7
- package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts.map +1 -1
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts +0 -3
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
- package/lib/types/client/kimi-code/locales.d.ts +32 -32
- package/lib/types/client/kimi-code/locales.d.ts.map +1 -1
- package/lib/types/client/kimi-code/styles.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +45 -35
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/minimax-code/MinimaxCodeComposerQuota.d.ts +4 -8
- package/lib/types/client/minimax-code/MinimaxCodeComposerQuota.d.ts.map +1 -1
- package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts +8 -37
- package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts.map +1 -1
- package/lib/types/client/minimax-code/api.d.ts +3 -3
- package/lib/types/client/minimax-code/api.d.ts.map +1 -1
- package/lib/types/client/minimax-code/locales.d.ts +29 -56
- package/lib/types/client/minimax-code/locales.d.ts.map +1 -1
- package/lib/types/client/minimax-code/useMinimaxCodeSection.d.ts +115 -0
- package/lib/types/client/minimax-code/useMinimaxCodeSection.d.ts.map +1 -0
- package/lib/types/client/ollama/OllamaSection.d.ts +2 -2
- package/lib/types/client/ollama/OllamaSection.d.ts.map +1 -1
- package/lib/types/client/ollama/locales.d.ts +54 -24
- package/lib/types/client/ollama/locales.d.ts.map +1 -1
- package/lib/types/client/styles.d.ts.map +1 -1
- package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts +3 -7
- package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts.map +1 -1
- package/lib/types/client/workbuddy/WorkBuddySection.d.ts +10 -37
- package/lib/types/client/workbuddy/WorkBuddySection.d.ts.map +1 -1
- package/lib/types/client/workbuddy/locales.d.ts +0 -66
- package/lib/types/client/workbuddy/locales.d.ts.map +1 -1
- package/lib/types/client/workbuddy/useWorkBuddySection.d.ts +141 -0
- package/lib/types/client/workbuddy/useWorkBuddySection.d.ts.map +1 -0
- package/lib/types/host/antigravity/account-pool.d.ts +18 -1
- package/lib/types/host/antigravity/account-pool.d.ts.map +1 -1
- package/lib/types/host/antigravity/client.d.ts.map +1 -1
- package/lib/types/host/claude/account-pool.d.ts +22 -2
- package/lib/types/host/claude/account-pool.d.ts.map +1 -1
- package/lib/types/host/claude/client.d.ts +37 -5
- package/lib/types/host/claude/client.d.ts.map +1 -1
- package/lib/types/host/claude/routes.d.ts.map +1 -1
- package/lib/types/host/codex-account-pool.d.ts +26 -1
- package/lib/types/host/codex-account-pool.d.ts.map +1 -1
- package/lib/types/host/command-code/account-pool.d.ts +13 -1
- package/lib/types/host/command-code/account-pool.d.ts.map +1 -1
- package/lib/types/host/command-code/client.d.ts +2 -1
- package/lib/types/host/command-code/client.d.ts.map +1 -1
- package/lib/types/host/common/account-quota.d.ts +44 -0
- package/lib/types/host/common/account-quota.d.ts.map +1 -0
- package/lib/types/host/common/catalog-snapshot.d.ts +9 -0
- package/lib/types/host/common/catalog-snapshot.d.ts.map +1 -1
- package/lib/types/host/common/provider-route.d.ts +56 -0
- package/lib/types/host/common/provider-route.d.ts.map +1 -0
- package/lib/types/host/hub-overview.d.ts +26 -0
- package/lib/types/host/hub-overview.d.ts.map +1 -0
- package/lib/types/host/kimi-code/account-pool.d.ts +24 -1
- package/lib/types/host/kimi-code/account-pool.d.ts.map +1 -1
- package/lib/types/host/kimi-code/client.d.ts +23 -2
- package/lib/types/host/kimi-code/client.d.ts.map +1 -1
- package/lib/types/host/minimax-code/account-pool.d.ts +34 -2
- package/lib/types/host/minimax-code/account-pool.d.ts.map +1 -1
- package/lib/types/host/minimax-code/client.d.ts +23 -0
- package/lib/types/host/minimax-code/client.d.ts.map +1 -1
- package/lib/types/host/minimax-code/routes.d.ts.map +1 -1
- package/lib/types/host/oauth-service.d.ts +16 -0
- package/lib/types/host/oauth-service.d.ts.map +1 -1
- package/lib/types/host/usage-service.d.ts +27 -2
- package/lib/types/host/usage-service.d.ts.map +1 -1
- package/lib/types/host/workbuddy/account-pool.d.ts +13 -1
- package/lib/types/host/workbuddy/account-pool.d.ts.map +1 -1
- package/lib/types/host/workbuddy/client.d.ts +15 -0
- package/lib/types/host/workbuddy/client.d.ts.map +1 -1
- package/lib/types/host/workbuddy/routes.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/account-pool-contracts.d.ts +44 -0
- package/lib/types/shared/account-pool-contracts.d.ts.map +1 -1
- package/lib/types/shared/antigravity-contracts.d.ts +9 -3
- package/lib/types/shared/antigravity-contracts.d.ts.map +1 -1
- package/lib/types/shared/hub-contracts.d.ts +37 -0
- package/lib/types/shared/hub-contracts.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -9,17 +9,6 @@ export declare const zh: {
|
|
|
9
9
|
readonly plan: "套餐";
|
|
10
10
|
readonly accountId: "账号 ID";
|
|
11
11
|
readonly expires: "令牌到期";
|
|
12
|
-
readonly storage: "凭据存储";
|
|
13
|
-
readonly storageWindows: "Windows DPAPI(当前用户加密)";
|
|
14
|
-
readonly storageMacKeychain: "macOS 钥匙串(Keychain 加密)";
|
|
15
|
-
readonly storageLinuxFile: "Linux 用户私有文件(权限 0600)";
|
|
16
|
-
readonly storageMemory: "仅 Host 内存(不持久化)";
|
|
17
|
-
readonly storageUnavailable: "凭据存储不可用";
|
|
18
|
-
readonly securityWindows: "令牌由 Host 使用 Windows CurrentUser DPAPI 加密,不会进入浏览器、settings.yaml 或日志。";
|
|
19
|
-
readonly securityMacKeychain: "令牌由 Host 存入 macOS 登录钥匙串(Keychain),在本机加密保存,不会进入浏览器、settings.yaml 或日志。";
|
|
20
|
-
readonly securityLinuxFile: "令牌仅写入 Host 上当前 Linux 用户可读的 0600 文件,但不会额外加密;同 UID 进程、root、备份和磁盘快照仍可能读取。";
|
|
21
|
-
readonly securityMemory: "令牌仅保留在 Host 内存中,Host 退出后丢失。";
|
|
22
|
-
readonly securityUnavailable: "Host 无法安全访问凭据存储;请修复文件所有者或权限后重试。";
|
|
23
12
|
readonly signIn: "使用 ChatGPT 登录";
|
|
24
13
|
readonly signInAgain: "重新登录";
|
|
25
14
|
readonly cancel: "取消登录";
|
|
@@ -30,14 +19,9 @@ export declare const zh: {
|
|
|
30
19
|
readonly continueLogin: "打开 ChatGPT 登录页";
|
|
31
20
|
readonly loading: "正在读取状态…";
|
|
32
21
|
readonly connection: "连接";
|
|
33
|
-
readonly provider: "Provider";
|
|
34
|
-
readonly connectionState: "连接状态";
|
|
35
|
-
readonly connected: "可用";
|
|
36
|
-
readonly untested: "尚未测试";
|
|
37
22
|
readonly testConnection: "测试连接";
|
|
38
23
|
readonly testing: "测试中…";
|
|
39
24
|
readonly latency: "最近延迟";
|
|
40
|
-
readonly enableProvider: "启用此供应商";
|
|
41
25
|
readonly selectAll: "全选";
|
|
42
26
|
readonly unselectAll: "全不选";
|
|
43
27
|
readonly models: "可用模型";
|
|
@@ -150,6 +134,19 @@ export declare const zh: {
|
|
|
150
134
|
readonly imagePreviewOpenOriginal: "打开原图";
|
|
151
135
|
readonly retry: "重试";
|
|
152
136
|
readonly unknown: "未知";
|
|
137
|
+
readonly hubBack: "订阅服务";
|
|
138
|
+
readonly hubOverviewHint: "选择供应商以管理账号、模型与配额;右侧开关控制该供应商是否出现在模型列表中。";
|
|
139
|
+
readonly hubAccountCount: "{count} 个账号";
|
|
140
|
+
readonly hubNoAccounts: "暂无账号,点击进入添加";
|
|
141
|
+
readonly hubStateEnabled: "已启用";
|
|
142
|
+
readonly hubStateDisabled: "已停用";
|
|
143
|
+
readonly hubModelsEnabled: "{count} 个模型可用";
|
|
144
|
+
readonly hubModelsEnabledOfTotal: "{count}/{total} 个模型可用";
|
|
145
|
+
readonly hubStatusFailed: "状态读取失败";
|
|
146
|
+
readonly hubSwitchOn: "启用 {name}";
|
|
147
|
+
readonly hubSwitchOff: "停用 {name}";
|
|
148
|
+
readonly hubCardLabel: "{name},{annotation}";
|
|
149
|
+
readonly modelChecklistCount: "已启用 {count}/{total}";
|
|
153
150
|
readonly accountPool: string;
|
|
154
151
|
readonly addAccount: string;
|
|
155
152
|
readonly accountCount: string;
|
|
@@ -167,9 +164,17 @@ export declare const zh: {
|
|
|
167
164
|
readonly strategyRoundRobin: string;
|
|
168
165
|
readonly strategySticky: string;
|
|
169
166
|
readonly noAccounts: string;
|
|
170
|
-
readonly storageNotice: string;
|
|
171
167
|
readonly email: string;
|
|
172
168
|
readonly lastUsed: string;
|
|
169
|
+
readonly accountQuota: string;
|
|
170
|
+
readonly quotaNone: string;
|
|
171
|
+
readonly quotaSnapshot: string;
|
|
172
|
+
readonly quotaResets: string;
|
|
173
|
+
readonly quotaExhausted: string;
|
|
174
|
+
readonly quotaWindow: string;
|
|
175
|
+
readonly quotaUsed: string;
|
|
176
|
+
readonly quotaFactsScope: string;
|
|
177
|
+
readonly composerLabel: string;
|
|
173
178
|
};
|
|
174
179
|
export declare const en: Record<keyof typeof zh, string>;
|
|
175
180
|
export type LocaleKey = keyof typeof zh;
|
|
@@ -184,17 +189,6 @@ export declare const dictionaries: {
|
|
|
184
189
|
readonly plan: "套餐";
|
|
185
190
|
readonly accountId: "账号 ID";
|
|
186
191
|
readonly expires: "令牌到期";
|
|
187
|
-
readonly storage: "凭据存储";
|
|
188
|
-
readonly storageWindows: "Windows DPAPI(当前用户加密)";
|
|
189
|
-
readonly storageMacKeychain: "macOS 钥匙串(Keychain 加密)";
|
|
190
|
-
readonly storageLinuxFile: "Linux 用户私有文件(权限 0600)";
|
|
191
|
-
readonly storageMemory: "仅 Host 内存(不持久化)";
|
|
192
|
-
readonly storageUnavailable: "凭据存储不可用";
|
|
193
|
-
readonly securityWindows: "令牌由 Host 使用 Windows CurrentUser DPAPI 加密,不会进入浏览器、settings.yaml 或日志。";
|
|
194
|
-
readonly securityMacKeychain: "令牌由 Host 存入 macOS 登录钥匙串(Keychain),在本机加密保存,不会进入浏览器、settings.yaml 或日志。";
|
|
195
|
-
readonly securityLinuxFile: "令牌仅写入 Host 上当前 Linux 用户可读的 0600 文件,但不会额外加密;同 UID 进程、root、备份和磁盘快照仍可能读取。";
|
|
196
|
-
readonly securityMemory: "令牌仅保留在 Host 内存中,Host 退出后丢失。";
|
|
197
|
-
readonly securityUnavailable: "Host 无法安全访问凭据存储;请修复文件所有者或权限后重试。";
|
|
198
192
|
readonly signIn: "使用 ChatGPT 登录";
|
|
199
193
|
readonly signInAgain: "重新登录";
|
|
200
194
|
readonly cancel: "取消登录";
|
|
@@ -205,14 +199,9 @@ export declare const dictionaries: {
|
|
|
205
199
|
readonly continueLogin: "打开 ChatGPT 登录页";
|
|
206
200
|
readonly loading: "正在读取状态…";
|
|
207
201
|
readonly connection: "连接";
|
|
208
|
-
readonly provider: "Provider";
|
|
209
|
-
readonly connectionState: "连接状态";
|
|
210
|
-
readonly connected: "可用";
|
|
211
|
-
readonly untested: "尚未测试";
|
|
212
202
|
readonly testConnection: "测试连接";
|
|
213
203
|
readonly testing: "测试中…";
|
|
214
204
|
readonly latency: "最近延迟";
|
|
215
|
-
readonly enableProvider: "启用此供应商";
|
|
216
205
|
readonly selectAll: "全选";
|
|
217
206
|
readonly unselectAll: "全不选";
|
|
218
207
|
readonly models: "可用模型";
|
|
@@ -325,6 +314,19 @@ export declare const dictionaries: {
|
|
|
325
314
|
readonly imagePreviewOpenOriginal: "打开原图";
|
|
326
315
|
readonly retry: "重试";
|
|
327
316
|
readonly unknown: "未知";
|
|
317
|
+
readonly hubBack: "订阅服务";
|
|
318
|
+
readonly hubOverviewHint: "选择供应商以管理账号、模型与配额;右侧开关控制该供应商是否出现在模型列表中。";
|
|
319
|
+
readonly hubAccountCount: "{count} 个账号";
|
|
320
|
+
readonly hubNoAccounts: "暂无账号,点击进入添加";
|
|
321
|
+
readonly hubStateEnabled: "已启用";
|
|
322
|
+
readonly hubStateDisabled: "已停用";
|
|
323
|
+
readonly hubModelsEnabled: "{count} 个模型可用";
|
|
324
|
+
readonly hubModelsEnabledOfTotal: "{count}/{total} 个模型可用";
|
|
325
|
+
readonly hubStatusFailed: "状态读取失败";
|
|
326
|
+
readonly hubSwitchOn: "启用 {name}";
|
|
327
|
+
readonly hubSwitchOff: "停用 {name}";
|
|
328
|
+
readonly hubCardLabel: "{name},{annotation}";
|
|
329
|
+
readonly modelChecklistCount: "已启用 {count}/{total}";
|
|
328
330
|
readonly accountPool: string;
|
|
329
331
|
readonly addAccount: string;
|
|
330
332
|
readonly accountCount: string;
|
|
@@ -342,10 +344,18 @@ export declare const dictionaries: {
|
|
|
342
344
|
readonly strategyRoundRobin: string;
|
|
343
345
|
readonly strategySticky: string;
|
|
344
346
|
readonly noAccounts: string;
|
|
345
|
-
readonly storageNotice: string;
|
|
346
347
|
readonly email: string;
|
|
347
348
|
readonly lastUsed: string;
|
|
349
|
+
readonly accountQuota: string;
|
|
350
|
+
readonly quotaNone: string;
|
|
351
|
+
readonly quotaSnapshot: string;
|
|
352
|
+
readonly quotaResets: string;
|
|
353
|
+
readonly quotaExhausted: string;
|
|
354
|
+
readonly quotaWindow: string;
|
|
355
|
+
readonly quotaUsed: string;
|
|
356
|
+
readonly quotaFactsScope: string;
|
|
357
|
+
readonly composerLabel: string;
|
|
348
358
|
};
|
|
349
|
-
en: Record<"
|
|
359
|
+
en: Record<"used" | "tokens" | "title" | "hubTitle" | "intro" | "account" | "signedOut" | "signedIn" | "plan" | "accountId" | "expires" | "signIn" | "signInAgain" | "cancel" | "signOut" | "refreshToken" | "pending" | "popupBlocked" | "continueLogin" | "loading" | "connection" | "testConnection" | "testing" | "latency" | "selectAll" | "unselectAll" | "models" | "modelsHint" | "proxySettings" | "proxyMode" | "proxyModeHint" | "proxyModeAuto" | "proxyModeCustom" | "proxyModeDirect" | "customProxyUrl" | "customProxyUrlHint" | "customProxyUrlPlaceholder" | "saveProxyUrl" | "proxyDetected" | "proxyDetectedEffective" | "proxyNoneDetected" | "proxyDirectHint" | "enhancements" | "fastMode" | "fastModeHint" | "outputVerbosity" | "outputVerbosityHint" | "verbosityLow" | "verbosityMedium" | "verbosityHigh" | "reasoningSummary" | "reasoningSummaryHint" | "summaryAuto" | "summaryConcise" | "summaryDetailed" | "summaryNone" | "searchProvider" | "searchProviderHint" | "searchProviderDsh" | "searchProviderCodex" | "fetchStatus" | "fetchStatusHint" | "fetchConfiguredProvider" | "fetchProviderDshDefault" | "switcherState" | "switcherStateIdle" | "switcherStateApplying" | "switcherStateApplied" | "switcherStateMissing" | "switcherStateFailed" | "fetchMode" | "fetchModeAuto" | "fetchModePlugin" | "fetchModeDsh" | "fetchMaxBodyChars" | "fetchMaxResponseBytes" | "characters" | "bytes" | "fetchLimitsInactive" | "fetchConfigSource" | "providerDefault" | "contextWindows" | "contextWindowsHint" | "contextWindow" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "contextWindowsNoneEnabled" | "saveContextWindow" | "save" | "quickQuota" | "quickQuotaHint" | "quota" | "quotaIntro" | "refreshQuota" | "refreshing" | "noQuota" | "quotaSignedOut" | "stale" | "updated" | "primary" | "secondary" | "limitWindow" | "remaining" | "available" | "unavailable" | "unlimited" | "credits" | "monthlySpend" | "resetCredits" | "resetCreditExpires" | "useResetCredit" | "usingResetCredit" | "useResetCreditConfirm" | "resetCreditUsed" | "spendControlReached" | "limit" | "exhausted" | "resets" | "quickQuotaLabel" | "quickQuotaLoading" | "imageToolRunning" | "imageToolDone" | "imageToolFailed" | "image" | "openImage" | "openNamedImage" | "imageLoading" | "imageLoadFailed" | "imagePreviewClose" | "imagePreviewOpenOriginal" | "retry" | "unknown" | "hubBack" | "hubOverviewHint" | "hubAccountCount" | "hubNoAccounts" | "hubStateEnabled" | "hubStateDisabled" | "hubModelsEnabled" | "hubModelsEnabledOfTotal" | "hubStatusFailed" | "hubSwitchOn" | "hubSwitchOff" | "hubCardLabel" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "relogin" | "rotationStrategy" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel", string>;
|
|
350
360
|
};
|
|
351
361
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE,EAAG,0BAAmC,CAAA;AAIrD,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE,EAAG,0BAAmC,CAAA;AAIrD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJL,CAAA;AAEV,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAsJ9C,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAA;AACvC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAA"}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import type { ModelDirectoryState } from '@deepseek-ai/dsh-client-ui-model-selection/client';
|
|
2
2
|
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
-
import {
|
|
3
|
+
import type { MinimaxCodeWebStatus } from '../../shared/minimax-code-contracts.ts';
|
|
4
|
+
import { type ComposerQuotaFacts } from '../common/ComposerQuotaBadge.tsx';
|
|
4
5
|
import type { SnapshotStore } from '../store.ts';
|
|
5
6
|
import { NS_MINIMAX_CODE } from './locales.ts';
|
|
6
7
|
type Props = PropsRuntime<'conversation.input.right'> & PropsLocale<typeof NS_MINIMAX_CODE> & {
|
|
7
8
|
directory: SnapshotStore<ModelDirectoryState>;
|
|
8
9
|
loadModelDirectory: () => void;
|
|
9
10
|
};
|
|
10
|
-
interface BadgeFacts {
|
|
11
|
-
text: string;
|
|
12
|
-
tooltip: string;
|
|
13
|
-
level: 'normal' | 'warning' | 'danger';
|
|
14
|
-
}
|
|
15
11
|
/**
|
|
16
12
|
* Pick the badge facts for one status answer, or nothing at all.
|
|
17
13
|
*
|
|
@@ -21,7 +17,7 @@ interface BadgeFacts {
|
|
|
21
17
|
* is not rendered, rather than showing a placeholder that would read as a broken
|
|
22
18
|
* meter. Callers must treat null as "hide the badge".
|
|
23
19
|
*/
|
|
24
|
-
export declare function selectBadgeFacts(status: MinimaxCodeWebStatus | null):
|
|
25
|
-
export declare function MinimaxCodeComposerQuota({
|
|
20
|
+
export declare function selectBadgeFacts(status: MinimaxCodeWebStatus | null): ComposerQuotaFacts | null;
|
|
21
|
+
export declare function MinimaxCodeComposerQuota({ directory, loadModelDirectory, t }: Props): React.JSX.Element | null;
|
|
26
22
|
export {};
|
|
27
23
|
//# sourceMappingURL=MinimaxCodeComposerQuota.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinimaxCodeComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/MinimaxCodeComposerQuota.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MinimaxCodeComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/MinimaxCodeComposerQuota.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAE1G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAI9C,KAAK,KAAK,GAAG,YAAY,CAAC,0BAA0B,CAAC,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,GAAG;IAC5F,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,kBAAkB,GAAG,IAAI,CAgB/F;AAED,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAc9G"}
|
|
@@ -1,40 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type MinimaxCodeCredentialStorage } from '../../shared/minimax-code-contracts.ts';
|
|
3
|
-
import { zh } from './locales.ts';
|
|
4
|
-
/**
|
|
5
|
-
* Parse "1M", "512K", "200000" into a positive integer token count.
|
|
6
|
-
*
|
|
7
|
-
* Every provider card carries its own copy of this pair rather than importing one
|
|
8
|
-
* from a shared module; the value is user input in a free-text field and a bad
|
|
9
|
-
* parse silently corrupts the overflow judgement, so it stays next to the only
|
|
10
|
-
* field that produces it.
|
|
11
|
-
*/
|
|
12
|
-
export declare function parsePositiveCapacity(value: string): number | null;
|
|
13
|
-
/** Render a token capacity the way the capacity field seeds itself. */
|
|
14
|
-
export declare function formatCapacity(value: number): string;
|
|
15
1
|
/**
|
|
16
|
-
*
|
|
2
|
+
* The MiniMax Code settings card.
|
|
17
3
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
4
|
+
* Markup only: every piece of state, every effect and every request this card
|
|
5
|
+
* makes lives in 'useMinimaxCodeSection.ts', which returns one named shape the
|
|
6
|
+
* JSX below reads. The two files are the split of a single 915-line component —
|
|
7
|
+
* the behaviour is unchanged, and this one should stay render-shaped.
|
|
22
8
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* The keys this card renders.
|
|
28
|
-
*
|
|
29
|
-
* The provider hub hosts every provider tab inside one settings section whose
|
|
30
|
-
* injected `t` seat is bound to the hub's own namespace, and every sibling tab
|
|
31
|
-
* therefore renders its own dictionary instead of that seat (see KimiCodeSection,
|
|
32
|
-
* WorkBuddySection and CommandCodeSection, none of which declare a locale prop).
|
|
33
|
-
* This card must do the same: its keys are not a subset of the hub's, so using the
|
|
34
|
-
* hub's seat resolves the overlap to ChatGPT wording ("使用 ChatGPT 登录" on the
|
|
35
|
-
* MiniMax tab) and every other key to the literal key text.
|
|
36
|
-
*/
|
|
37
|
-
type Translate = (key: keyof typeof zh) => string;
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { type MinimaxCodeSectionProps } from './useMinimaxCodeSection.ts';
|
|
38
11
|
/**
|
|
39
12
|
* Hours still left on the access token, or null once it has run out.
|
|
40
13
|
*
|
|
@@ -43,7 +16,5 @@ type Translate = (key: keyof typeof zh) => string;
|
|
|
43
16
|
* rounding down to 0.
|
|
44
17
|
*/
|
|
45
18
|
export declare function remainingHours(expiresAtMs: number | undefined): string | null;
|
|
46
|
-
export declare function
|
|
47
|
-
export declare function MinimaxCodeSection({ onModelChange }: Props): React.JSX.Element;
|
|
48
|
-
export {};
|
|
19
|
+
export declare function MinimaxCodeSection({ onModelChange }: MinimaxCodeSectionProps): React.JSX.Element;
|
|
49
20
|
//# sourceMappingURL=MinimaxCodeSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinimaxCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/MinimaxCodeSection.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"MinimaxCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/MinimaxCodeSection.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAGL,KAAK,uBAAuB,EAE7B,MAAM,4BAA4B,CAAA;AASnC;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAK7E;AAED,wBAAgB,kBAAkB,CAAC,EAAE,aAAa,EAAE,EAAE,uBAAuB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA8XhG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
export declare
|
|
3
|
-
export declare
|
|
1
|
+
export declare const request: <T>(path: string, init?: RequestInit) => Promise<T>;
|
|
2
|
+
export declare const get: <T>(path: string) => Promise<T>;
|
|
3
|
+
export declare const post: <T>(path: string, body?: object) => Promise<T>;
|
|
4
4
|
export declare function messageOf(cause: unknown): string;
|
|
5
5
|
//# sourceMappingURL=api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/api.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,OAAO,qDAAc,CAAA;AAClC,eAAO,MAAM,GAAG,iCAAU,CAAA;AAC1B,eAAO,MAAM,IAAI,gDAAW,CAAA;AAE5B,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEhD"}
|
|
@@ -11,11 +11,6 @@ export declare const zh: {
|
|
|
11
11
|
readonly region: "区域";
|
|
12
12
|
readonly regionCn: "中国大陆 (minimax.cn)";
|
|
13
13
|
readonly regionGlobal: "国际 (minimax.io)";
|
|
14
|
-
readonly storage: "凭据存储";
|
|
15
|
-
readonly storageNative: "MiniMax Code 原生凭据(~/.minimax/auth)";
|
|
16
|
-
readonly storageDpapi: "Windows DPAPI(当前用户加密)";
|
|
17
|
-
readonly storageFile: "本地凭据文件";
|
|
18
|
-
readonly storagePath: "凭据路径";
|
|
19
14
|
readonly expiresAt: "令牌到期";
|
|
20
15
|
readonly expiresRemaining: "剩余 {hours} 小时";
|
|
21
16
|
readonly expiresExpired: "已过期";
|
|
@@ -38,10 +33,6 @@ export declare const zh: {
|
|
|
38
33
|
readonly loginDenied: "授权被拒绝。";
|
|
39
34
|
readonly logoutOwnedByApp: "当前登录态属于 MiniMax Code 桌面端:本插件复用它并会在需要时续期写回,但不会撤销或删除它(那会把你从正在运行的 MiniMax Code 里踢下线)。请在 MiniMax Code 应用中退出登录。";
|
|
40
35
|
readonly connection: "连接";
|
|
41
|
-
readonly provider: "Provider";
|
|
42
|
-
readonly connectionState: "连接状态";
|
|
43
|
-
readonly connected: "已连接";
|
|
44
|
-
readonly untested: "未测试";
|
|
45
36
|
readonly routeOwned: "本插件正在服务该模型路由。";
|
|
46
37
|
readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重新加载。";
|
|
47
38
|
readonly testConnection: "测试连接";
|
|
@@ -70,17 +61,10 @@ export declare const zh: {
|
|
|
70
61
|
readonly quotaUnreachable: "暂时读不到用量(用量端点未应答),稍后会自动重试。";
|
|
71
62
|
readonly quotaTokenExpired: "读取用量时令牌刚好过期,正在自动续期——账号仍然是登录状态,无需重新登录。";
|
|
72
63
|
readonly quotaStale: "下面是上一次成功读取到的用量(本次刷新未成功),稍后会自动重试。";
|
|
73
|
-
readonly
|
|
74
|
-
readonly quotaRemaining: "剩余 {percent}%";
|
|
75
|
-
readonly quotaReset: "重置:{time}";
|
|
64
|
+
readonly quotaUsedShare: "已用 {percent}%";
|
|
76
65
|
readonly quotaRefresh: "刷新用量";
|
|
77
66
|
readonly quotaRefreshing: "刷新中...";
|
|
78
|
-
readonly quotaWindowInterval: "5 小时窗口";
|
|
79
|
-
readonly quotaWindowWeekly: "每周窗口";
|
|
80
|
-
readonly quotaUnlimited: "不限量";
|
|
81
|
-
readonly quotaCounts: "已用 {used} / {total}";
|
|
82
67
|
readonly composerLabel: "额度";
|
|
83
|
-
readonly enableProvider: "启用此供应商";
|
|
84
68
|
readonly selectAll: "全选";
|
|
85
69
|
readonly unselectAll: "全不选";
|
|
86
70
|
readonly enhanced: "增强功能";
|
|
@@ -120,9 +104,16 @@ export declare const zh: {
|
|
|
120
104
|
readonly strategyRoundRobin: string;
|
|
121
105
|
readonly strategySticky: string;
|
|
122
106
|
readonly noAccounts: string;
|
|
123
|
-
readonly storageNotice: string;
|
|
124
107
|
readonly expires: string;
|
|
125
108
|
readonly lastUsed: string;
|
|
109
|
+
readonly accountQuota: string;
|
|
110
|
+
readonly quotaNone: string;
|
|
111
|
+
readonly quotaSnapshot: string;
|
|
112
|
+
readonly quotaResets: string;
|
|
113
|
+
readonly quotaExhausted: string;
|
|
114
|
+
readonly quotaWindow: string;
|
|
115
|
+
readonly quotaUsed: string;
|
|
116
|
+
readonly quotaFactsScope: string;
|
|
126
117
|
};
|
|
127
118
|
export declare const en: Record<keyof typeof zh, string>;
|
|
128
119
|
export declare const dictionaries: {
|
|
@@ -138,11 +129,6 @@ export declare const dictionaries: {
|
|
|
138
129
|
readonly region: "区域";
|
|
139
130
|
readonly regionCn: "中国大陆 (minimax.cn)";
|
|
140
131
|
readonly regionGlobal: "国际 (minimax.io)";
|
|
141
|
-
readonly storage: "凭据存储";
|
|
142
|
-
readonly storageNative: "MiniMax Code 原生凭据(~/.minimax/auth)";
|
|
143
|
-
readonly storageDpapi: "Windows DPAPI(当前用户加密)";
|
|
144
|
-
readonly storageFile: "本地凭据文件";
|
|
145
|
-
readonly storagePath: "凭据路径";
|
|
146
132
|
readonly expiresAt: "令牌到期";
|
|
147
133
|
readonly expiresRemaining: "剩余 {hours} 小时";
|
|
148
134
|
readonly expiresExpired: "已过期";
|
|
@@ -165,10 +151,6 @@ export declare const dictionaries: {
|
|
|
165
151
|
readonly loginDenied: "授权被拒绝。";
|
|
166
152
|
readonly logoutOwnedByApp: "当前登录态属于 MiniMax Code 桌面端:本插件复用它并会在需要时续期写回,但不会撤销或删除它(那会把你从正在运行的 MiniMax Code 里踢下线)。请在 MiniMax Code 应用中退出登录。";
|
|
167
153
|
readonly connection: "连接";
|
|
168
|
-
readonly provider: "Provider";
|
|
169
|
-
readonly connectionState: "连接状态";
|
|
170
|
-
readonly connected: "已连接";
|
|
171
|
-
readonly untested: "未测试";
|
|
172
154
|
readonly routeOwned: "本插件正在服务该模型路由。";
|
|
173
155
|
readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重新加载。";
|
|
174
156
|
readonly testConnection: "测试连接";
|
|
@@ -197,17 +179,10 @@ export declare const dictionaries: {
|
|
|
197
179
|
readonly quotaUnreachable: "暂时读不到用量(用量端点未应答),稍后会自动重试。";
|
|
198
180
|
readonly quotaTokenExpired: "读取用量时令牌刚好过期,正在自动续期——账号仍然是登录状态,无需重新登录。";
|
|
199
181
|
readonly quotaStale: "下面是上一次成功读取到的用量(本次刷新未成功),稍后会自动重试。";
|
|
200
|
-
readonly
|
|
201
|
-
readonly quotaRemaining: "剩余 {percent}%";
|
|
202
|
-
readonly quotaReset: "重置:{time}";
|
|
182
|
+
readonly quotaUsedShare: "已用 {percent}%";
|
|
203
183
|
readonly quotaRefresh: "刷新用量";
|
|
204
184
|
readonly quotaRefreshing: "刷新中...";
|
|
205
|
-
readonly quotaWindowInterval: "5 小时窗口";
|
|
206
|
-
readonly quotaWindowWeekly: "每周窗口";
|
|
207
|
-
readonly quotaUnlimited: "不限量";
|
|
208
|
-
readonly quotaCounts: "已用 {used} / {total}";
|
|
209
185
|
readonly composerLabel: "额度";
|
|
210
|
-
readonly enableProvider: "启用此供应商";
|
|
211
186
|
readonly selectAll: "全选";
|
|
212
187
|
readonly unselectAll: "全不选";
|
|
213
188
|
readonly enhanced: "增强功能";
|
|
@@ -247,9 +222,16 @@ export declare const dictionaries: {
|
|
|
247
222
|
readonly strategyRoundRobin: string;
|
|
248
223
|
readonly strategySticky: string;
|
|
249
224
|
readonly noAccounts: string;
|
|
250
|
-
readonly storageNotice: string;
|
|
251
225
|
readonly expires: string;
|
|
252
226
|
readonly lastUsed: string;
|
|
227
|
+
readonly accountQuota: string;
|
|
228
|
+
readonly quotaNone: string;
|
|
229
|
+
readonly quotaSnapshot: string;
|
|
230
|
+
readonly quotaResets: string;
|
|
231
|
+
readonly quotaExhausted: string;
|
|
232
|
+
readonly quotaWindow: string;
|
|
233
|
+
readonly quotaUsed: string;
|
|
234
|
+
readonly quotaFactsScope: string;
|
|
253
235
|
};
|
|
254
236
|
'zh-CN': {
|
|
255
237
|
readonly title: "MiniMax Code";
|
|
@@ -263,11 +245,6 @@ export declare const dictionaries: {
|
|
|
263
245
|
readonly region: "区域";
|
|
264
246
|
readonly regionCn: "中国大陆 (minimax.cn)";
|
|
265
247
|
readonly regionGlobal: "国际 (minimax.io)";
|
|
266
|
-
readonly storage: "凭据存储";
|
|
267
|
-
readonly storageNative: "MiniMax Code 原生凭据(~/.minimax/auth)";
|
|
268
|
-
readonly storageDpapi: "Windows DPAPI(当前用户加密)";
|
|
269
|
-
readonly storageFile: "本地凭据文件";
|
|
270
|
-
readonly storagePath: "凭据路径";
|
|
271
248
|
readonly expiresAt: "令牌到期";
|
|
272
249
|
readonly expiresRemaining: "剩余 {hours} 小时";
|
|
273
250
|
readonly expiresExpired: "已过期";
|
|
@@ -290,10 +267,6 @@ export declare const dictionaries: {
|
|
|
290
267
|
readonly loginDenied: "授权被拒绝。";
|
|
291
268
|
readonly logoutOwnedByApp: "当前登录态属于 MiniMax Code 桌面端:本插件复用它并会在需要时续期写回,但不会撤销或删除它(那会把你从正在运行的 MiniMax Code 里踢下线)。请在 MiniMax Code 应用中退出登录。";
|
|
292
269
|
readonly connection: "连接";
|
|
293
|
-
readonly provider: "Provider";
|
|
294
|
-
readonly connectionState: "连接状态";
|
|
295
|
-
readonly connected: "已连接";
|
|
296
|
-
readonly untested: "未测试";
|
|
297
270
|
readonly routeOwned: "本插件正在服务该模型路由。";
|
|
298
271
|
readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重新加载。";
|
|
299
272
|
readonly testConnection: "测试连接";
|
|
@@ -322,17 +295,10 @@ export declare const dictionaries: {
|
|
|
322
295
|
readonly quotaUnreachable: "暂时读不到用量(用量端点未应答),稍后会自动重试。";
|
|
323
296
|
readonly quotaTokenExpired: "读取用量时令牌刚好过期,正在自动续期——账号仍然是登录状态,无需重新登录。";
|
|
324
297
|
readonly quotaStale: "下面是上一次成功读取到的用量(本次刷新未成功),稍后会自动重试。";
|
|
325
|
-
readonly
|
|
326
|
-
readonly quotaRemaining: "剩余 {percent}%";
|
|
327
|
-
readonly quotaReset: "重置:{time}";
|
|
298
|
+
readonly quotaUsedShare: "已用 {percent}%";
|
|
328
299
|
readonly quotaRefresh: "刷新用量";
|
|
329
300
|
readonly quotaRefreshing: "刷新中...";
|
|
330
|
-
readonly quotaWindowInterval: "5 小时窗口";
|
|
331
|
-
readonly quotaWindowWeekly: "每周窗口";
|
|
332
|
-
readonly quotaUnlimited: "不限量";
|
|
333
|
-
readonly quotaCounts: "已用 {used} / {total}";
|
|
334
301
|
readonly composerLabel: "额度";
|
|
335
|
-
readonly enableProvider: "启用此供应商";
|
|
336
302
|
readonly selectAll: "全选";
|
|
337
303
|
readonly unselectAll: "全不选";
|
|
338
304
|
readonly enhanced: "增强功能";
|
|
@@ -372,12 +338,19 @@ export declare const dictionaries: {
|
|
|
372
338
|
readonly strategyRoundRobin: string;
|
|
373
339
|
readonly strategySticky: string;
|
|
374
340
|
readonly noAccounts: string;
|
|
375
|
-
readonly storageNotice: string;
|
|
376
341
|
readonly expires: string;
|
|
377
342
|
readonly lastUsed: string;
|
|
343
|
+
readonly accountQuota: string;
|
|
344
|
+
readonly quotaNone: string;
|
|
345
|
+
readonly quotaSnapshot: string;
|
|
346
|
+
readonly quotaResets: string;
|
|
347
|
+
readonly quotaExhausted: string;
|
|
348
|
+
readonly quotaWindow: string;
|
|
349
|
+
readonly quotaUsed: string;
|
|
350
|
+
readonly quotaFactsScope: string;
|
|
378
351
|
};
|
|
379
|
-
en: Record<"
|
|
380
|
-
'en-US': Record<"
|
|
352
|
+
en: Record<"tokens" | "title" | "account" | "signedOut" | "signedIn" | "accountId" | "expires" | "signIn" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "unknown" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "relogin" | "rotationStrategy" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "loginFailed" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "capImage" | "quotaRefreshing" | "copied" | "openSignInPage" | "region" | "regionGlobal" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "accountLabel" | "regionCn" | "expiresAt" | "expiresRemaining" | "expiresExpired" | "expiresHint" | "codeMinutes" | "loginExpired" | "loginDenied" | "logoutOwnedByApp" | "testSuccessModel" | "modelsUnavailable" | "dailyCheckin" | "checkinHint" | "checkinAuto" | "checkinToday" | "checkinSkipped" | "checkinFailed" | "checkinStreak" | "checkinClaimed" | "checkinLastRun" | "checkinNever" | "checkinNow" | "checkinRunning" | "quotaUnavailable" | "quotaNeedsApiKey" | "quotaUnreachable" | "quotaTokenExpired" | "quotaStale" | "quotaUsedShare" | "quotaRefresh" | "invalidCapacity" | "thinkingAlwaysOn" | "thinkingToggle" | "thinkingForced" | "capText", string>;
|
|
353
|
+
'en-US': Record<"tokens" | "title" | "account" | "signedOut" | "signedIn" | "accountId" | "expires" | "signIn" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "unknown" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "relogin" | "rotationStrategy" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "loginFailed" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "capImage" | "quotaRefreshing" | "copied" | "openSignInPage" | "region" | "regionGlobal" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "accountLabel" | "regionCn" | "expiresAt" | "expiresRemaining" | "expiresExpired" | "expiresHint" | "codeMinutes" | "loginExpired" | "loginDenied" | "logoutOwnedByApp" | "testSuccessModel" | "modelsUnavailable" | "dailyCheckin" | "checkinHint" | "checkinAuto" | "checkinToday" | "checkinSkipped" | "checkinFailed" | "checkinStreak" | "checkinClaimed" | "checkinLastRun" | "checkinNever" | "checkinNow" | "checkinRunning" | "quotaUnavailable" | "quotaNeedsApiKey" | "quotaUnreachable" | "quotaTokenExpired" | "quotaStale" | "quotaUsedShare" | "quotaRefresh" | "invalidCapacity" | "thinkingAlwaysOn" | "thinkingToggle" | "thinkingForced" | "capText", string>;
|
|
381
354
|
};
|
|
382
355
|
export type MinimaxCodeLocaleKey = keyof typeof zh;
|
|
383
356
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,qBAAqB,CAAA;AAEjD,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,qBAAqB,CAAA;AAEjD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FL,CAAA;AAEV,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAyF9C,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,EAAE,CAAA"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { AccountPoolStatusDto, AccountRotationStrategy } from '../../shared/account-pool-contracts.ts';
|
|
2
|
+
import type { MinimaxCodeAccount, MinimaxCodeModelOption, MinimaxCodeQuota, MinimaxCodeReasoningEffort, MinimaxCodeWebLogin, MinimaxCodeWebStatus } from '../../shared/minimax-code-contracts.ts';
|
|
3
|
+
import type { AccountPoolLabels } from '../common/AccountPoolSection.tsx';
|
|
4
|
+
import { zh } from './locales.ts';
|
|
5
|
+
/** The pool slice the status card renders, absent when the line has no pool. */
|
|
6
|
+
export type MinimaxCodePoolStatus = Pick<AccountPoolStatusDto, 'accounts' | 'rotationStrategy'> & {
|
|
7
|
+
activeAccountId?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The keys this card renders.
|
|
11
|
+
*
|
|
12
|
+
* The provider hub hosts every provider tab inside one settings section whose
|
|
13
|
+
* injected `t` seat is bound to the hub's own namespace, and every sibling tab
|
|
14
|
+
* therefore renders its own dictionary instead of that seat (see KimiCodeSection,
|
|
15
|
+
* WorkBuddySection and CommandCodeSection, none of which declare a locale prop).
|
|
16
|
+
* This card must do the same: its keys are not a subset of the hub's, so using the
|
|
17
|
+
* hub's seat resolves the overlap to ChatGPT wording ("使用 ChatGPT 登录" on the
|
|
18
|
+
* MiniMax tab) and every other key to the literal key text.
|
|
19
|
+
*/
|
|
20
|
+
export type Translate = (key: keyof typeof zh) => string;
|
|
21
|
+
/** The card's own dictionary; stable identity keeps effect dependencies intact. */
|
|
22
|
+
export declare const fallbackTranslate: Translate;
|
|
23
|
+
/**
|
|
24
|
+
* Props this card accepts.
|
|
25
|
+
*
|
|
26
|
+
* Deliberately the same shape every sibling tab declares: the hub hands each tab
|
|
27
|
+
* only the refresh callback. The card does not take the hub's `settings.section`
|
|
28
|
+
* runtime seat or its locale seat, because it renders its own dictionary (see
|
|
29
|
+
* below) and needs none of that scope's other props.
|
|
30
|
+
*/
|
|
31
|
+
export interface MinimaxCodeSectionProps {
|
|
32
|
+
onModelChange?: () => void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Everything the card's view consumes, grouped by kind.
|
|
36
|
+
*
|
|
37
|
+
* Returned as one named shape instead of one status blob: a reader can see at a
|
|
38
|
+
* glance what the hook tracks, what it computes from a status answer, and what
|
|
39
|
+
* the view is allowed to ask it to do.
|
|
40
|
+
*/
|
|
41
|
+
export interface MinimaxCodeSectionView {
|
|
42
|
+
/** Values that change as the card runs. */
|
|
43
|
+
state: {
|
|
44
|
+
/** Last status answer; null until the first read lands. */
|
|
45
|
+
status: MinimaxCodeWebStatus | null;
|
|
46
|
+
/** True until the first status read settles, whatever its outcome. */
|
|
47
|
+
loading: boolean;
|
|
48
|
+
/** Id of the action in flight, or null; every disabled control reads it. */
|
|
49
|
+
busy: string | null;
|
|
50
|
+
/** The failure the card's error strip shows. */
|
|
51
|
+
error: string | null;
|
|
52
|
+
/** The device-code flow being polled, when one is running. */
|
|
53
|
+
flow: MinimaxCodeWebLogin | null;
|
|
54
|
+
/** Whether the user code was just copied, so the button can say so. */
|
|
55
|
+
copied: boolean;
|
|
56
|
+
/** Result of the last explicit connection test, as one sentence. */
|
|
57
|
+
connectionNotice: string | null;
|
|
58
|
+
/** One free-text capacity draft per model, keyed by model id. */
|
|
59
|
+
contextDrafts: Record<string, string>;
|
|
60
|
+
/** Model id whose context-window save or restore is in flight. */
|
|
61
|
+
savingModel: string | null;
|
|
62
|
+
/** The pool slice read beside the status; undefined when the line has no pool. */
|
|
63
|
+
pool: MinimaxCodePoolStatus | undefined;
|
|
64
|
+
};
|
|
65
|
+
/** Facts read straight off the current status answer. */
|
|
66
|
+
derived: {
|
|
67
|
+
/** Whether the line holds a usable credential. */
|
|
68
|
+
authenticated: boolean;
|
|
69
|
+
/** The signed-in account, when the host reports one. */
|
|
70
|
+
account: MinimaxCodeAccount | undefined;
|
|
71
|
+
/** The displayed account's usage snapshot, when the host has one. */
|
|
72
|
+
quota: MinimaxCodeQuota | undefined;
|
|
73
|
+
/** Every catalog row, in catalog order. */
|
|
74
|
+
models: MinimaxCodeModelOption[];
|
|
75
|
+
/** Models the context-window editor offers: the enabled ones only. */
|
|
76
|
+
contextModels: MinimaxCodeModelOption[];
|
|
77
|
+
/** How many stored overrides exist, whether or not a row still shows them. */
|
|
78
|
+
overrideCount: number;
|
|
79
|
+
/**
|
|
80
|
+
* The line's label set, handed to the shared pool card as one object.
|
|
81
|
+
*
|
|
82
|
+
* The hook resolves it for its own sentences too, so the view takes the
|
|
83
|
+
* assembled labels from here rather than reaching for a second binding.
|
|
84
|
+
*/
|
|
85
|
+
poolLabels: AccountPoolLabels;
|
|
86
|
+
};
|
|
87
|
+
/** Everything the view can trigger. */
|
|
88
|
+
actions: {
|
|
89
|
+
/** Start a device-code sign-in. */
|
|
90
|
+
login(): Promise<void>;
|
|
91
|
+
cancelLogin(): Promise<void>;
|
|
92
|
+
/** Copy the flow's user code; the button says so for two seconds. */
|
|
93
|
+
copyCode(): Promise<void>;
|
|
94
|
+
logout(): Promise<void>;
|
|
95
|
+
/** One account-level action on the shared pool card. */
|
|
96
|
+
poolAction(action: 'set-primary' | 'delete' | 'clear-cooldown' | 'relogin', accountId: string): Promise<void>;
|
|
97
|
+
setStrategy(strategy: AccountRotationStrategy): Promise<void>;
|
|
98
|
+
toggleModel(modelId: string, checked: boolean): void;
|
|
99
|
+
setAllModels(selectAll: boolean): void;
|
|
100
|
+
/** Flip the check-in scheduler's own switch. */
|
|
101
|
+
setCheckinEnabled(enabled: boolean): Promise<void>;
|
|
102
|
+
/** Run one check-in pass now. */
|
|
103
|
+
runCheckinNow(): Promise<void>;
|
|
104
|
+
updateEffort(effort: MinimaxCodeReasoningEffort | null): Promise<void>;
|
|
105
|
+
saveContextWindow(modelId: string): Promise<void>;
|
|
106
|
+
resetContextWindow(modelId: string): Promise<void>;
|
|
107
|
+
resetAllContextWindows(): Promise<void>;
|
|
108
|
+
refreshQuota(): Promise<void>;
|
|
109
|
+
testConnection(): Promise<void>;
|
|
110
|
+
/** Edit one capacity draft mid-typing; the editor never parses it. */
|
|
111
|
+
updateContextDraft(modelId: string, draft: string): void;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export declare function useMinimaxCodeSection({ onModelChange }: MinimaxCodeSectionProps): MinimaxCodeSectionView;
|
|
115
|
+
//# sourceMappingURL=useMinimaxCodeSection.d.ts.map
|