@eddyskywalker/dsh-chatgpt-subscription 0.75.2 → 0.76.1
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 +35 -0
- package/README.md +1 -1
- package/lib/client.js +978 -789
- package/lib/client.js.map +1 -1
- package/lib/index.js +630 -306
- package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -1
- package/lib/types/client/antigravity-acp/AntigravityAcpSection.d.ts.map +1 -1
- package/lib/types/client/antigravity-acp/locales.d.ts +6 -0
- package/lib/types/client/antigravity-acp/locales.d.ts.map +1 -1
- package/lib/types/client/claude/ClaudeSection.d.ts.map +1 -1
- package/lib/types/client/cline-pass/ClinePassSection.d.ts.map +1 -1
- package/lib/types/client/command-code/CommandCodeSection.d.ts.map +1 -1
- package/lib/types/client/common/LineProxySection.d.ts +78 -0
- package/lib/types/client/common/LineProxySection.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/GlmCodingPlanSection.d.ts.map +1 -1
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
- package/lib/types/client/locales-ru/antigravity-acp.d.ts.map +1 -1
- package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +15 -3
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts.map +1 -1
- package/lib/types/client/ollama/OllamaSection.d.ts.map +1 -1
- package/lib/types/client/opendesign/OpenDesignSection.d.ts.map +1 -1
- package/lib/types/client/qoder/QoderSection.d.ts.map +1 -1
- package/lib/types/client/step-code/StepCodeSection.d.ts.map +1 -1
- package/lib/types/client/workbuddy/WorkBuddySection.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/antigravity-acp/binary.d.ts +6 -0
- package/lib/types/host/antigravity-acp/binary.d.ts.map +1 -1
- package/lib/types/host/antigravity-acp/login.d.ts +9 -16
- package/lib/types/host/antigravity-acp/login.d.ts.map +1 -1
- package/lib/types/host/preferences.d.ts.map +1 -1
- package/lib/types/host/proxy-manager.d.ts +37 -3
- package/lib/types/host/proxy-manager.d.ts.map +1 -1
- package/lib/types/host/routes.d.ts.map +1 -1
- package/lib/types/host/workbuddy/model-catalog.d.ts +20 -10
- package/lib/types/host/workbuddy/model-catalog.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/contracts.d.ts +53 -0
- package/lib/types/shared/contracts.d.ts.map +1 -1
- package/lib/types/shared/preferences.d.ts +51 -1
- package/lib/types/shared/preferences.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -1066,6 +1066,772 @@ window.__ModuleLoader__.load({
|
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
1068
|
//#endregion
|
|
1069
|
+
//#region src/client/locales.ts
|
|
1070
|
+
const NS = "dsh-chatgpt-subscription";
|
|
1071
|
+
const zh$15 = {
|
|
1072
|
+
...accountPoolZh,
|
|
1073
|
+
title: "ChatGPT",
|
|
1074
|
+
hubTitle: "订阅服务",
|
|
1075
|
+
intro: "使用 ChatGPT 账号登录,在 DSH 中使用订阅可用的模型。",
|
|
1076
|
+
account: "账号",
|
|
1077
|
+
signedOut: "尚未登录",
|
|
1078
|
+
signedIn: "已登录",
|
|
1079
|
+
plan: "套餐",
|
|
1080
|
+
accountId: "账号 ID",
|
|
1081
|
+
expires: "令牌到期",
|
|
1082
|
+
signIn: "使用 ChatGPT 登录",
|
|
1083
|
+
signInAgain: "重新登录",
|
|
1084
|
+
cancel: "取消登录",
|
|
1085
|
+
signOut: "注销",
|
|
1086
|
+
refreshToken: "刷新凭据",
|
|
1087
|
+
pending: "请在浏览器中完成登录。",
|
|
1088
|
+
popupBlocked: "浏览器拦截了登录窗口,请使用下面的链接继续。",
|
|
1089
|
+
continueLogin: "打开 ChatGPT 登录页",
|
|
1090
|
+
loading: "正在读取状态…",
|
|
1091
|
+
connection: "连接",
|
|
1092
|
+
testConnection: "测试连接",
|
|
1093
|
+
testing: "测试中…",
|
|
1094
|
+
latency: "最近延迟",
|
|
1095
|
+
selectAll: "全选",
|
|
1096
|
+
unselectAll: "全不选",
|
|
1097
|
+
models: "可用模型",
|
|
1098
|
+
modelsHint: "勾选后模型才会显示在对话页的模型选择列表中;全部取消勾选或关闭上方开关可在列表中隐藏该供应商。",
|
|
1099
|
+
proxySettings: "网络代理",
|
|
1100
|
+
proxyMode: "代理模式",
|
|
1101
|
+
proxyModeHint: "只影响本线路的对话、登录与续期、模型目录和额度读取;支持自动读取系统代理,修改后对后续请求生效。",
|
|
1102
|
+
proxyModeAuto: "系统代理(自动检测)",
|
|
1103
|
+
proxyModeCustom: "自定义代理",
|
|
1104
|
+
proxyModeDirect: "直连(禁用代理)",
|
|
1105
|
+
customProxyUrl: "自定义代理地址",
|
|
1106
|
+
customProxyUrlHint: "支持 HTTP/HTTPS/SOCKS5 代理地址,例如 http://127.0.0.1:7890",
|
|
1107
|
+
customProxyUrlPlaceholder: "例如: http://127.0.0.1:7890",
|
|
1108
|
+
saveProxyUrl: "保存代理地址",
|
|
1109
|
+
noProxy: "不使用代理的主机",
|
|
1110
|
+
noProxyHint: "这些主机始终直连。此列表全局生效、所有线路共用。用逗号或空格分隔,支持精确主机、域名后缀(api.corp.example)与 host:port,并与进程环境和 $DSH_HOME/.env 里的 NO_PROXY 合并。",
|
|
1111
|
+
noProxyPlaceholder: "例如: copilot.tencent.com, *.corp.example, gateway.lan:8080",
|
|
1112
|
+
saveNoProxy: "保存直连主机列表",
|
|
1113
|
+
proxyDirectActive: "当前生效:直连(不经过代理)",
|
|
1114
|
+
proxyActiveTemplate: "当前生效:{proxy}",
|
|
1115
|
+
proxyDetected: "检测到系统代理",
|
|
1116
|
+
proxyDetectedEffective: "(已自动生效)",
|
|
1117
|
+
proxyNoneDetected: "未检测到系统代理,将使用直连",
|
|
1118
|
+
proxyDirectHint: "本插件的全部请求将直接连接,不经过任何代理服务器。",
|
|
1119
|
+
poolStorageTitle: "账号存储位置",
|
|
1120
|
+
poolStorageKeyring: "桌面密钥环",
|
|
1121
|
+
poolStorageCredentials: "DSH 凭据库",
|
|
1122
|
+
poolStorageKeyringHint: "仅限桌面安装:使用操作系统密钥环(DPAPI / 钥匙串 / Secret Service)。在服务器或无桌面的 Linux 主机上密钥环通常不可用,登录会失败——请改选 DSH 凭据库。",
|
|
1123
|
+
poolStorageCredentialsHint: "DSH 的标准密钥存储($DSH_HOME/.credentials.yaml)。POSIX 上强制 0600、创建者独占;Windows 上只有 profile ACL,没有权限位可强制。服务器以及任何没有桌面密钥环的主机都用它。静态不加密,靠宿主权限保护。",
|
|
1124
|
+
poolStorageEffective: "当前实际使用:{storage}",
|
|
1125
|
+
poolStorageBackendKeyring: "桌面密钥环(Secret Service),静态加密",
|
|
1126
|
+
poolStorageBackendDpapi: "Windows DPAPI,静态加密",
|
|
1127
|
+
poolStorageBackendKeychain: "macOS 钥匙串,静态加密",
|
|
1128
|
+
poolStorageBackendCredentials: "DSH 凭据库(.credentials.yaml),由文件权限保护",
|
|
1129
|
+
poolStorageSwitchWarning: "已保存在另一个存储里的账号会留在原处,切回去之前不会显示。不会做迁移。",
|
|
1130
|
+
poolStorageUnavailableKeyring: "这台主机上没有可用的桌面密钥环,因此号池无法读写。请把「账号存储位置」改成 DSH 凭据库。",
|
|
1131
|
+
poolStorageUnavailableCredentials: "这个 harness 没有凭据库(ctx.credentials),因此号池无法读写。请把「账号存储位置」改成桌面密钥环。",
|
|
1132
|
+
poolStorageUnavailableStore: "号池存储这次没有应答,所以这里没有列出账号——账号并没有被删除,存储恢复后重新打开本页即可。",
|
|
1133
|
+
enhancements: "增强功能",
|
|
1134
|
+
fastMode: "快速模式(1.5x 速度)",
|
|
1135
|
+
fastModeHint: "提升 Token 生成速度至约 1.5 倍;将以约 2x–2.5x 速度消耗 Codex 订阅额度。",
|
|
1136
|
+
outputVerbosity: "输出详细程度",
|
|
1137
|
+
outputVerbosityHint: "控制 Codex 最终回答的详细程度;不影响思考深度。默认值与官方 Codex 客户端一致(低)。",
|
|
1138
|
+
verbosityLow: "低(保持回答简洁)",
|
|
1139
|
+
verbosityMedium: "中(兼顾细节与简洁)",
|
|
1140
|
+
verbosityHigh: "高(在回答中包含更多细节)",
|
|
1141
|
+
reasoningSummary: "推理摘要",
|
|
1142
|
+
reasoningSummaryHint: "选择 ChatGPT 总结其推理的方式;不影响思考深度。默认值与官方 Codex 客户端一致(不生成摘要,可省额度)。",
|
|
1143
|
+
summaryAuto: "自动(让模型选择摘要详细程度)",
|
|
1144
|
+
summaryConcise: "简洁(显示简要推理摘要)",
|
|
1145
|
+
summaryDetailed: "详细(显示更详细的推理摘要)",
|
|
1146
|
+
summaryNone: "无(不显示推理摘要)",
|
|
1147
|
+
searchProvider: "搜索来源",
|
|
1148
|
+
searchProviderHint: "选择 DSH 联网搜索使用默认来源,或改用当前 ChatGPT 订阅的 Codex 来源(自动走代理隧道)。抓取模式为 auto 时,抓取来源跟随此选择。",
|
|
1149
|
+
searchProviderDsh: "DSH 默认",
|
|
1150
|
+
searchProviderCodex: "ChatGPT(代理隧道)",
|
|
1151
|
+
fetchStatus: "抓取来源(只读)",
|
|
1152
|
+
fetchStatusHint: "以下内容由 Host 上报,只读展示。",
|
|
1153
|
+
fetchConfiguredProvider: "配置的抓取 Provider",
|
|
1154
|
+
fetchProviderDshDefault: "DSH 默认(Host 未固定抓取 provider)",
|
|
1155
|
+
switcherState: "抓取选择器状态",
|
|
1156
|
+
switcherStateIdle: "空闲(尚未应用选择)",
|
|
1157
|
+
switcherStateApplying: "应用中(正在切换 Host 的 web provider)",
|
|
1158
|
+
switcherStateApplied: "已应用",
|
|
1159
|
+
switcherStateMissing: "未找到可切换的 web 服务",
|
|
1160
|
+
switcherStateFailed: "切换失败,请检查 Host 日志",
|
|
1161
|
+
fetchMode: "抓取模式",
|
|
1162
|
+
fetchModeAuto: "auto(有可用代理或选了 ChatGPT 搜索时用插件抓取)",
|
|
1163
|
+
fetchModePlugin: "plugin(始终用本插件抓取)",
|
|
1164
|
+
fetchModeDsh: "dsh(保留 DSH 原有抓取来源)",
|
|
1165
|
+
fetchMaxBodyChars: "插件正文上限",
|
|
1166
|
+
fetchMaxResponseBytes: "插件响应体上限",
|
|
1167
|
+
characters: "字符",
|
|
1168
|
+
bytes: "字节",
|
|
1169
|
+
fetchLimitsInactive: "仅在实际使用插件抓取时生效;走 DSH 原有抓取来源时不适用这两个上限。",
|
|
1170
|
+
fetchConfigSource: "模式与上限在插件 Config 中修改(不是本页面偏好),修改后重载插件或重启 DSH 生效。",
|
|
1171
|
+
providerDefault: "使用 Provider 默认值",
|
|
1172
|
+
contextWindows: "模型上下文窗口",
|
|
1173
|
+
contextWindowsHint: "只列出已勾选「可用模型」的条目。默认取模型目录值(GPT-6 系列 384K,最高 872K;其余最高 1M),该值用于 DSH 的压缩与溢出判断,可输入 872K、512K 等容量;改过的模型可单独或一键恢复默认。",
|
|
1174
|
+
contextWindow: "上下文窗口",
|
|
1175
|
+
contextWindowInvalid: "上下文窗口必须是正整数,且不能超过模型上限(GPT-6 系列为 872K,其余为 1M);可使用 K 或 M 后缀。",
|
|
1176
|
+
contextWindowReset: "恢复默认",
|
|
1177
|
+
contextWindowResetAll: "全部恢复默认",
|
|
1178
|
+
contextWindowResetAllConfirm: "确定把已改过的模型上下文窗口全部恢复为默认值吗?",
|
|
1179
|
+
contextWindowsNoneEnabled: "还没有勾选任何模型。在上方「可用模型」里勾选后,这里会出现该模型的上下文窗口设置。",
|
|
1180
|
+
saveContextWindow: "保存上下文窗口",
|
|
1181
|
+
save: "保存",
|
|
1182
|
+
tokens: "tokens",
|
|
1183
|
+
quickQuota: "在输入框旁显示快捷用量",
|
|
1184
|
+
quickQuotaHint: "仅在当前会话选中 codex-chatgpt 模型时显示。",
|
|
1185
|
+
quota: "用量与限额",
|
|
1186
|
+
quotaIntro: "数据来自 ChatGPT Codex 用量服务。页面可见时最多每 60 秒刷新一次。",
|
|
1187
|
+
refreshQuota: "刷新用量",
|
|
1188
|
+
refreshing: "刷新中…",
|
|
1189
|
+
noQuota: "当前套餐未返回可显示的限额窗口。",
|
|
1190
|
+
quotaSignedOut: "登录后可查看订阅限额。",
|
|
1191
|
+
stale: "显示的是上次成功获取的数据。",
|
|
1192
|
+
updated: "更新时间",
|
|
1193
|
+
primary: "主要窗口",
|
|
1194
|
+
secondary: "次要窗口",
|
|
1195
|
+
limitWindow: "额度",
|
|
1196
|
+
used: "已使用",
|
|
1197
|
+
remaining: "剩余",
|
|
1198
|
+
available: "可用",
|
|
1199
|
+
unavailable: "不可用",
|
|
1200
|
+
unlimited: "无限",
|
|
1201
|
+
credits: "Credits",
|
|
1202
|
+
monthlySpend: "月度消费控制",
|
|
1203
|
+
resetCredits: "重置次数",
|
|
1204
|
+
resetCreditExpires: "到期时间",
|
|
1205
|
+
useResetCredit: "使用重置卡",
|
|
1206
|
+
usingResetCredit: "使用中…",
|
|
1207
|
+
useResetCreditConfirm: "使用后会立即消耗 1 次重置机会,并重置符合条件的 Codex 额度窗口。确定继续吗?",
|
|
1208
|
+
resetCreditUsed: "重置卡已使用,用量数据已刷新。",
|
|
1209
|
+
spendControlReached: "已触发月度消费控制,新的订阅调用可能被限制。",
|
|
1210
|
+
limit: "上限",
|
|
1211
|
+
exhausted: "额度已用尽",
|
|
1212
|
+
resets: "重置",
|
|
1213
|
+
quickQuotaLabel: "Codex 剩余",
|
|
1214
|
+
quickQuotaLoading: "用量…",
|
|
1215
|
+
imageToolRunning: "正在生成图片",
|
|
1216
|
+
imageToolDone: "已生成图片",
|
|
1217
|
+
imageToolFailed: "图片生成失败",
|
|
1218
|
+
image: "图片",
|
|
1219
|
+
openImage: "打开图片",
|
|
1220
|
+
openNamedImage: "打开 {name}",
|
|
1221
|
+
imageLoading: "加载图片…",
|
|
1222
|
+
imageLoadFailed: "图片加载失败,点击重试",
|
|
1223
|
+
imagePreviewClose: "关闭",
|
|
1224
|
+
imagePreviewOpenOriginal: "打开原图",
|
|
1225
|
+
retry: "重试",
|
|
1226
|
+
unknown: "未知",
|
|
1227
|
+
hubBack: "订阅服务",
|
|
1228
|
+
hubOverviewHint: "选择供应商以管理账号、模型与配额;右侧开关控制该供应商是否出现在模型列表中。",
|
|
1229
|
+
hubAccountCount: "{count} 个账号",
|
|
1230
|
+
hubNoAccounts: "暂无账号,点击进入添加",
|
|
1231
|
+
hubStateEnabled: "已启用",
|
|
1232
|
+
hubStateDisabled: "已停用",
|
|
1233
|
+
hubModelsEnabled: "{count} 个模型可用",
|
|
1234
|
+
hubModelsEnabledOfTotal: "{count}/{total} 个模型可用",
|
|
1235
|
+
hubStatusFailed: "状态读取失败",
|
|
1236
|
+
hubSwitchOn: "启用 {name}",
|
|
1237
|
+
hubSwitchOff: "停用 {name}",
|
|
1238
|
+
hubCardLabel: "{name},{annotation}",
|
|
1239
|
+
hubUpdateCheck: "检测更新",
|
|
1240
|
+
hubUpdateChecking: "检测中…",
|
|
1241
|
+
hubUpdateApply: "更新到 v{version}",
|
|
1242
|
+
hubUpdateApplying: "更新中…",
|
|
1243
|
+
hubUpdateUpToDate: "已是最新版本 {version}",
|
|
1244
|
+
hubUpdateLatestWithUnknownCurrent: "最新版本 {version},当前版本未知",
|
|
1245
|
+
hubUpdateAvailable: "有新版本 {version},当前 {current}",
|
|
1246
|
+
hubUpdateInstalled: "已安装 v{version},重启宿主后生效",
|
|
1247
|
+
hubUpdateInstalledReplaced: "已移除旧版并安装 v{version},重启宿主后生效",
|
|
1248
|
+
hubUpdateInstalledLive: "已安装 v{version},当前已生效,无需重启",
|
|
1249
|
+
hubUpdateInstalledReplacedLive: "已移除旧版并安装 v{version},当前已生效,无需重启",
|
|
1250
|
+
hubUpdateFailedRestored: "更新失败,已恢复 v{version}",
|
|
1251
|
+
hubUpdateFailedRollbackFailed: "更新失败,且旧版本也没能重新装回来——插件可能已不可用",
|
|
1252
|
+
hubUpdateFailedRollbackSkipped: "更新失败,且无法自动恢复原版本——插件可能已被移除",
|
|
1253
|
+
hubUpdateDevelopmentInstall: "有新版本 {version};当前是本地链接安装,无法自动更新",
|
|
1254
|
+
hubUpdatePluginManagerMissing: "有新版本 {version};宿主未提供 pluginManager,无法自动更新",
|
|
1255
|
+
hubUpdateManualOnly: "有新版本 {version};当前安装方式无法自动更新",
|
|
1256
|
+
hubUpdateCheckFailed: "检测失败:无法连接 npm 源,请检查网络或代理",
|
|
1257
|
+
hubUpdateCommandLabel: "手动更新命令",
|
|
1258
|
+
localCodexLoginImport: "导入本机登录",
|
|
1259
|
+
localCodexLoginImporting: "导入中…",
|
|
1260
|
+
deviceCodeLogin: "设备代码登录",
|
|
1261
|
+
deviceCodeLoginStarting: "获取代码…",
|
|
1262
|
+
deviceCodeLoginDetail: "用设备代码添加账号",
|
|
1263
|
+
deviceCodeHint: "在任意设备上打开下面的链接并输入这个代码,本页会自动完成登录:这条路不需要浏览器回调到本机端口。",
|
|
1264
|
+
deviceCodeLabel: "设备代码",
|
|
1265
|
+
deviceCodeOpen: "打开确认页面",
|
|
1266
|
+
deviceCodeCopy: "复制到剪贴板",
|
|
1267
|
+
deviceCodeWaiting: "等待确认… 剩余 {time}",
|
|
1268
|
+
stopImporting: "停止导入全部本机登录",
|
|
1269
|
+
stopImportingLabel: "停止导入全部本机登录(当前 {count} 个)",
|
|
1270
|
+
stopImportingBusy: "停止导入中…",
|
|
1271
|
+
stopImportingHint: "停止导入只会让本插件忘记本机 CLI 登录的副本;Codex CLI 自己的登录文件不会被删除或修改。账号池不允许逐条删除借来的凭据,所以这里一次会停止全部导入。",
|
|
1272
|
+
"cardName.chatgpt": "ChatGPT",
|
|
1273
|
+
"cardName.command-code": "Command Code",
|
|
1274
|
+
"cardName.kimi-code": "Kimi Code",
|
|
1275
|
+
"cardName.minimax-code": "MiniMax Code",
|
|
1276
|
+
"cardName.glm-coding-plan": "GLM(ZCode 账号)",
|
|
1277
|
+
"cardName.claude": "Claude",
|
|
1278
|
+
"cardName.ollama": "Ollama",
|
|
1279
|
+
"cardName.step-code": "Step Code(Step Plan 订阅)",
|
|
1280
|
+
"cardName.cline-pass": "Cline Pass",
|
|
1281
|
+
"cardName.qoder": "Qoder(订阅)",
|
|
1282
|
+
"cardName.opendesign": "OpenDesign",
|
|
1283
|
+
"cardName.workbuddy": "WorkBuddy",
|
|
1284
|
+
"cardName.antigravity-acp": "Antigravity(ACP)",
|
|
1285
|
+
modelChecklistCount: "已启用 {count}/{total}",
|
|
1286
|
+
codeRunTitle: "代码",
|
|
1287
|
+
codeRunOutput: "输出",
|
|
1288
|
+
codeRunCopy: "复制",
|
|
1289
|
+
codeRunCopied: "已复制",
|
|
1290
|
+
codeRunWrap: "自动换行",
|
|
1291
|
+
codeRunUnwrap: "取消自动换行",
|
|
1292
|
+
codeRunInspect: "查看轨迹",
|
|
1293
|
+
codeRunPreparing: "准备中",
|
|
1294
|
+
codeRunRunning: "运行中",
|
|
1295
|
+
codeRunFailed: "失败",
|
|
1296
|
+
codeRunStopped: "已停止"
|
|
1297
|
+
};
|
|
1298
|
+
const dictionaries$15 = {
|
|
1299
|
+
zh: zh$15,
|
|
1300
|
+
en: {
|
|
1301
|
+
...accountPoolEn,
|
|
1302
|
+
title: "ChatGPT",
|
|
1303
|
+
hubTitle: "Subscriptions",
|
|
1304
|
+
intro: "Sign in with ChatGPT to use models available to your subscription in DSH.",
|
|
1305
|
+
account: "Account",
|
|
1306
|
+
signedOut: "Not signed in",
|
|
1307
|
+
signedIn: "Signed in",
|
|
1308
|
+
plan: "Plan",
|
|
1309
|
+
accountId: "Account ID",
|
|
1310
|
+
expires: "Token expires",
|
|
1311
|
+
signIn: "Sign in with ChatGPT",
|
|
1312
|
+
signInAgain: "Sign in again",
|
|
1313
|
+
cancel: "Cancel sign-in",
|
|
1314
|
+
signOut: "Sign out",
|
|
1315
|
+
refreshToken: "Refresh credentials",
|
|
1316
|
+
pending: "Complete sign-in in your browser.",
|
|
1317
|
+
popupBlocked: "The sign-in window was blocked. Use the link below to continue.",
|
|
1318
|
+
continueLogin: "Open ChatGPT sign-in",
|
|
1319
|
+
loading: "Reading status…",
|
|
1320
|
+
connection: "Connection",
|
|
1321
|
+
testConnection: "Test connection",
|
|
1322
|
+
testing: "Testing…",
|
|
1323
|
+
latency: "Last latency",
|
|
1324
|
+
selectAll: "Select all",
|
|
1325
|
+
unselectAll: "Unselect all",
|
|
1326
|
+
models: "Available models",
|
|
1327
|
+
modelsHint: "Checked models appear in the conversation model picker; unchecking all or turning off the switch hides this provider from the picker.",
|
|
1328
|
+
proxySettings: "Network Proxy",
|
|
1329
|
+
proxyMode: "Proxy Mode",
|
|
1330
|
+
proxyModeHint: "Affects only this line: its conversations, sign-in and renewal, model catalog and quota reads. Supports system proxy detection; changes apply to subsequent requests.",
|
|
1331
|
+
proxyModeAuto: "System Proxy (Auto-detect)",
|
|
1332
|
+
proxyModeCustom: "Custom Proxy",
|
|
1333
|
+
proxyModeDirect: "Direct (No Proxy)",
|
|
1334
|
+
customProxyUrl: "Custom Proxy URL",
|
|
1335
|
+
customProxyUrlHint: "Supports HTTP/HTTPS/SOCKS5 proxy URLs, e.g. http://127.0.0.1:7890",
|
|
1336
|
+
customProxyUrlPlaceholder: "e.g. http://127.0.0.1:7890",
|
|
1337
|
+
saveProxyUrl: "Save Proxy URL",
|
|
1338
|
+
noProxy: "Hosts that bypass the proxy",
|
|
1339
|
+
noProxyHint: "These hosts always connect directly. This list is global: every line shares it. Separate entries with commas or spaces; exact hosts, domain suffixes (api.corp.example) and host:port are supported, and the list is merged with NO_PROXY from the process environment and $DSH_HOME/.env.",
|
|
1340
|
+
noProxyPlaceholder: "e.g. copilot.tencent.com, *.corp.example, gateway.lan:8080",
|
|
1341
|
+
saveNoProxy: "Save bypass list",
|
|
1342
|
+
proxyDirectActive: "Active now: direct (no proxy)",
|
|
1343
|
+
proxyActiveTemplate: "Active now: {proxy}",
|
|
1344
|
+
proxyDetected: "Detected system proxy",
|
|
1345
|
+
proxyDetectedEffective: " (active)",
|
|
1346
|
+
proxyNoneDetected: "No system proxy detected; connecting directly",
|
|
1347
|
+
proxyDirectHint: "Every request from this plugin connects directly without using any proxy server.",
|
|
1348
|
+
poolStorageTitle: "Account storage",
|
|
1349
|
+
poolStorageKeyring: "Desktop keyring",
|
|
1350
|
+
poolStorageCredentials: "DSH credential store",
|
|
1351
|
+
poolStorageKeyringHint: "Desktop installs only: uses the OS keyring (DPAPI / Keychain / Secret Service). On a server or a headless Linux host the keyring is usually unavailable and sign-in will fail — pick the DSH credential store instead.",
|
|
1352
|
+
poolStorageCredentialsHint: "The standard DSH secret store ($DSH_HOME/.credentials.yaml). POSIX: 0600 enforced, owner-only; Windows: profile ACL, no mode enforcement. Use this on servers and any host without a desktop keyring. Stored unencrypted at rest, protected by the host.",
|
|
1353
|
+
poolStorageEffective: "In use now: {storage}",
|
|
1354
|
+
poolStorageBackendKeyring: "desktop keyring (Secret Service), encrypted at rest",
|
|
1355
|
+
poolStorageBackendDpapi: "Windows DPAPI, encrypted at rest",
|
|
1356
|
+
poolStorageBackendKeychain: "macOS Keychain, encrypted at rest",
|
|
1357
|
+
poolStorageBackendCredentials: "DSH credential store (.credentials.yaml), protected by file permissions",
|
|
1358
|
+
poolStorageSwitchWarning: "Accounts saved in the other store stay there and are not shown until you switch back. There is no migration.",
|
|
1359
|
+
poolStorageUnavailableKeyring: "This host has no usable desktop keyring, so the account pool cannot be read or written. Switch Account storage to the DSH credential store.",
|
|
1360
|
+
poolStorageUnavailableCredentials: "This harness has no credential store (ctx.credentials), so the account pool cannot be read or written. Switch Account storage to the desktop keyring.",
|
|
1361
|
+
poolStorageUnavailableStore: "The pool store did not answer this time, so no accounts are listed here — none were deleted; reopen this page once the store answers again.",
|
|
1362
|
+
enhancements: "Enhancements",
|
|
1363
|
+
fastMode: "Fast mode (1.5x speed)",
|
|
1364
|
+
fastModeHint: "Generates tokens ~1.5x faster; consumes Codex subscription quota at ~2x–2.5x the normal rate.",
|
|
1365
|
+
outputVerbosity: "Output verbosity",
|
|
1366
|
+
outputVerbosityHint: "Controls the detail level of final Codex answers without changing reasoning effort. The default matches the official Codex client (low).",
|
|
1367
|
+
verbosityLow: "Low (keep answers concise)",
|
|
1368
|
+
verbosityMedium: "Medium (balance detail and brevity)",
|
|
1369
|
+
verbosityHigh: "High (include more detail)",
|
|
1370
|
+
reasoningSummary: "Reasoning summary",
|
|
1371
|
+
reasoningSummaryHint: "Controls how ChatGPT summarizes its chain of thought; does not change reasoning depth. The default matches the official Codex client (no summary, which saves quota).",
|
|
1372
|
+
summaryAuto: "Auto (let model determine detail)",
|
|
1373
|
+
summaryConcise: "Concise (brief summary)",
|
|
1374
|
+
summaryDetailed: "Detailed (in-depth summary)",
|
|
1375
|
+
summaryNone: "None (hide reasoning summary)",
|
|
1376
|
+
searchProvider: "Search provider",
|
|
1377
|
+
searchProviderHint: "Choose whether DSH web search uses the default provider or the Codex proxy-backed source from this ChatGPT subscription. Fetch mode \"auto\" follows this choice.",
|
|
1378
|
+
searchProviderDsh: "DSH default",
|
|
1379
|
+
searchProviderCodex: "ChatGPT (Proxy tunnel)",
|
|
1380
|
+
fetchStatus: "Fetch source (read-only)",
|
|
1381
|
+
fetchStatusHint: "Reported by the host. Read-only.",
|
|
1382
|
+
fetchConfiguredProvider: "Configured fetch provider",
|
|
1383
|
+
fetchProviderDshDefault: "DSH default (the host pins no fetch provider)",
|
|
1384
|
+
switcherState: "Fetch switcher state",
|
|
1385
|
+
switcherStateIdle: "Idle (no selection applied yet)",
|
|
1386
|
+
switcherStateApplying: "Applying (host web provider switch in progress)",
|
|
1387
|
+
switcherStateApplied: "Applied",
|
|
1388
|
+
switcherStateMissing: "No web service found to switch",
|
|
1389
|
+
switcherStateFailed: "Switch failed, check the host log",
|
|
1390
|
+
fetchMode: "Fetch mode",
|
|
1391
|
+
fetchModeAuto: "auto (fetches with the plugin when a proxy is available or the ChatGPT search source is selected)",
|
|
1392
|
+
fetchModePlugin: "plugin (always fetch with this plugin)",
|
|
1393
|
+
fetchModeDsh: "dsh (keep the DSH default fetch source)",
|
|
1394
|
+
fetchMaxBodyChars: "Plugin body limit",
|
|
1395
|
+
fetchMaxResponseBytes: "Plugin response limit",
|
|
1396
|
+
characters: "chars",
|
|
1397
|
+
bytes: "bytes",
|
|
1398
|
+
fetchLimitsInactive: "Only applied when the plugin actually fetches; the DSH default fetch source does not use these two limits.",
|
|
1399
|
+
fetchConfigSource: "Mode and limits are changed in the plugin Config, not in these settings; they take effect after a plugin reload or a DSH restart.",
|
|
1400
|
+
providerDefault: "Use provider default",
|
|
1401
|
+
contextWindows: "Model context windows",
|
|
1402
|
+
contextWindowsHint: "Lists the models checked under Available models. Each starts at its catalog value (384K for the GPT-6 family, up to 872K; up to 1M otherwise); DSH uses it for compaction and overflow detection. Values such as 872K and 512K are accepted, and a changed model can be restored one by one or all at once.",
|
|
1403
|
+
contextWindow: "Context window",
|
|
1404
|
+
contextWindowInvalid: "The context window must be a positive integer within the model limit (872K for the GPT-6 family, 1M otherwise). K and M suffixes are accepted.",
|
|
1405
|
+
contextWindowReset: "Restore default",
|
|
1406
|
+
contextWindowResetAll: "Restore all defaults",
|
|
1407
|
+
contextWindowResetAllConfirm: "Restore every changed model context window to its default?",
|
|
1408
|
+
contextWindowsNoneEnabled: "No model is checked yet. Check one under Available models above and its context window setting appears here.",
|
|
1409
|
+
saveContextWindow: "Save context window",
|
|
1410
|
+
save: "Save",
|
|
1411
|
+
tokens: "tokens",
|
|
1412
|
+
quickQuota: "Show quick usage beside the composer",
|
|
1413
|
+
quickQuotaHint: "Shown only when the current session uses a codex-chatgpt model.",
|
|
1414
|
+
quota: "Usage and limits",
|
|
1415
|
+
quotaIntro: "Data comes from the ChatGPT Codex usage service and refreshes at most once per minute while visible.",
|
|
1416
|
+
refreshQuota: "Refresh usage",
|
|
1417
|
+
refreshing: "Refreshing…",
|
|
1418
|
+
noQuota: "Your plan did not return any displayable limit windows.",
|
|
1419
|
+
quotaSignedOut: "Sign in to view subscription limits.",
|
|
1420
|
+
stale: "Showing the last successfully fetched data.",
|
|
1421
|
+
updated: "Updated",
|
|
1422
|
+
primary: "Primary window",
|
|
1423
|
+
secondary: "Secondary window",
|
|
1424
|
+
limitWindow: "limit",
|
|
1425
|
+
used: "used",
|
|
1426
|
+
remaining: "remaining",
|
|
1427
|
+
available: "Available",
|
|
1428
|
+
unavailable: "Unavailable",
|
|
1429
|
+
unlimited: "Unlimited",
|
|
1430
|
+
credits: "Credits",
|
|
1431
|
+
monthlySpend: "Monthly spend control",
|
|
1432
|
+
resetCredits: "Reset credits",
|
|
1433
|
+
resetCreditExpires: "Expires",
|
|
1434
|
+
useResetCredit: "Use reset credit",
|
|
1435
|
+
usingResetCredit: "Using…",
|
|
1436
|
+
useResetCreditConfirm: "This immediately spends one reset credit and resets eligible Codex limit windows. Continue?",
|
|
1437
|
+
resetCreditUsed: "The reset credit was used and usage data was refreshed.",
|
|
1438
|
+
spendControlReached: "Monthly spend control has been reached; new subscription calls may be limited.",
|
|
1439
|
+
limit: "Limit",
|
|
1440
|
+
exhausted: "Quota exhausted",
|
|
1441
|
+
resets: "Resets",
|
|
1442
|
+
quickQuotaLabel: "Codex left",
|
|
1443
|
+
quickQuotaLoading: "Usage…",
|
|
1444
|
+
imageToolRunning: "Generating image",
|
|
1445
|
+
imageToolDone: "Generated image",
|
|
1446
|
+
imageToolFailed: "Image generation failed",
|
|
1447
|
+
image: "Image",
|
|
1448
|
+
openImage: "Open image",
|
|
1449
|
+
openNamedImage: "Open {name}",
|
|
1450
|
+
imageLoading: "Loading image…",
|
|
1451
|
+
imageLoadFailed: "Image failed to load. Click to retry",
|
|
1452
|
+
imagePreviewClose: "Close",
|
|
1453
|
+
imagePreviewOpenOriginal: "Open original",
|
|
1454
|
+
retry: "Retry",
|
|
1455
|
+
unknown: "Unknown",
|
|
1456
|
+
hubBack: "Subscriptions",
|
|
1457
|
+
hubOverviewHint: "Pick a provider to manage its accounts, models and quota. The switch controls whether it appears in the model picker.",
|
|
1458
|
+
hubAccountCount: "{count} accounts",
|
|
1459
|
+
hubNoAccounts: "No accounts yet — open to add one",
|
|
1460
|
+
hubStateEnabled: "Enabled",
|
|
1461
|
+
hubStateDisabled: "Disabled",
|
|
1462
|
+
hubModelsEnabled: "{count} models available",
|
|
1463
|
+
hubModelsEnabledOfTotal: "{count}/{total} models available",
|
|
1464
|
+
hubStatusFailed: "Status unavailable",
|
|
1465
|
+
hubSwitchOn: "Enable {name}",
|
|
1466
|
+
hubSwitchOff: "Disable {name}",
|
|
1467
|
+
hubCardLabel: "{name}, {annotation}",
|
|
1468
|
+
hubUpdateCheck: "Check for updates",
|
|
1469
|
+
hubUpdateChecking: "Checking…",
|
|
1470
|
+
hubUpdateApply: "Update to v{version}",
|
|
1471
|
+
hubUpdateApplying: "Updating…",
|
|
1472
|
+
hubUpdateUpToDate: "Up to date ({version})",
|
|
1473
|
+
hubUpdateLatestWithUnknownCurrent: "Latest is {version}; the running version is unknown",
|
|
1474
|
+
hubUpdateAvailable: "{version} is available — you have {current}",
|
|
1475
|
+
hubUpdateInstalled: "Installed v{version} — restart the Host to apply it",
|
|
1476
|
+
hubUpdateInstalledReplaced: "Removed the old copy and installed v{version} — restart the Host to apply it",
|
|
1477
|
+
hubUpdateInstalledLive: "Installed v{version} — active now, no restart needed",
|
|
1478
|
+
hubUpdateInstalledReplacedLive: "Removed the old copy and installed v{version} — active now, no restart needed",
|
|
1479
|
+
hubUpdateFailedRestored: "Update failed; v{version} was restored",
|
|
1480
|
+
hubUpdateFailedRollbackFailed: "Update failed, and the previous version could not be reinstalled — the plugin may no longer be available",
|
|
1481
|
+
hubUpdateFailedRollbackSkipped: "Update failed, and the previous version could not be restored — the plugin may have been removed",
|
|
1482
|
+
hubUpdateDevelopmentInstall: "{version} is available, but this copy is a local link and cannot update itself",
|
|
1483
|
+
hubUpdatePluginManagerMissing: "{version} is available, but this Host exposes no pluginManager to install it",
|
|
1484
|
+
hubUpdateManualOnly: "{version} is available, but this install cannot update itself",
|
|
1485
|
+
hubUpdateCheckFailed: "Check failed: the npm registry could not be reached — check the network or proxy",
|
|
1486
|
+
hubUpdateCommandLabel: "Manual update command",
|
|
1487
|
+
localCodexLoginImport: "Import local sign-in",
|
|
1488
|
+
localCodexLoginImporting: "Importing…",
|
|
1489
|
+
deviceCodeLogin: "Device-code sign-in",
|
|
1490
|
+
deviceCodeLoginStarting: "Requesting code…",
|
|
1491
|
+
deviceCodeLoginDetail: "Add account with device code",
|
|
1492
|
+
deviceCodeHint: "Open the link below on any device and enter this code. This page finishes the sign-in by itself: nothing has to call back to a local port.",
|
|
1493
|
+
deviceCodeLabel: "Device code",
|
|
1494
|
+
deviceCodeOpen: "Open the confirmation page",
|
|
1495
|
+
deviceCodeCopy: "Copy to clipboard",
|
|
1496
|
+
deviceCodeWaiting: "Waiting for confirmation… {time} remaining",
|
|
1497
|
+
stopImporting: "Stop importing all local sign-ins",
|
|
1498
|
+
stopImportingLabel: "Stop importing all local sign-ins ({count} currently imported)",
|
|
1499
|
+
stopImportingBusy: "Stopping the import…",
|
|
1500
|
+
stopImportingHint: "Stopping the import only makes this plugin forget its copy of the local CLI sign-in; the Codex CLI own sign-in file is never deleted or changed. The account pool does not allow deleting a borrowed credential one at a time, so this stops every import at once.",
|
|
1501
|
+
"cardName.chatgpt": "ChatGPT",
|
|
1502
|
+
"cardName.command-code": "Command Code",
|
|
1503
|
+
"cardName.kimi-code": "Kimi Code",
|
|
1504
|
+
"cardName.minimax-code": "MiniMax Code",
|
|
1505
|
+
"cardName.glm-coding-plan": "GLM (ZCode Account)",
|
|
1506
|
+
"cardName.claude": "Claude",
|
|
1507
|
+
"cardName.ollama": "Ollama",
|
|
1508
|
+
"cardName.step-code": "Step Code (Step Plan Subscription)",
|
|
1509
|
+
"cardName.cline-pass": "Cline Pass",
|
|
1510
|
+
"cardName.qoder": "Qoder Subscription",
|
|
1511
|
+
"cardName.opendesign": "OpenDesign",
|
|
1512
|
+
"cardName.workbuddy": "WorkBuddy",
|
|
1513
|
+
"cardName.antigravity-acp": "Antigravity (ACP)",
|
|
1514
|
+
modelChecklistCount: "{count}/{total} enabled",
|
|
1515
|
+
codeRunTitle: "Code",
|
|
1516
|
+
codeRunOutput: "Output",
|
|
1517
|
+
codeRunCopy: "Copy",
|
|
1518
|
+
codeRunCopied: "Copied",
|
|
1519
|
+
codeRunWrap: "Wrap lines",
|
|
1520
|
+
codeRunUnwrap: "Do not wrap lines",
|
|
1521
|
+
codeRunInspect: "Inspect",
|
|
1522
|
+
codeRunPreparing: "Preparing",
|
|
1523
|
+
codeRunRunning: "Running",
|
|
1524
|
+
codeRunFailed: "Failed",
|
|
1525
|
+
codeRunStopped: "Stopped"
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
//#endregion
|
|
1529
|
+
//#region src/client/common/line-locale.ts
|
|
1530
|
+
/**
|
|
1531
|
+
* Locale plumbing shared by the provider detail pages.
|
|
1532
|
+
*
|
|
1533
|
+
* Every card used to render its `zh` dictionary object directly, which pinned
|
|
1534
|
+
* the whole page to Chinese whatever the active locale was: the dictionaries
|
|
1535
|
+
* carry a complete English half, but nothing ever asked the locale service for
|
|
1536
|
+
* it. A card now renders a dictionary-shaped view of the registered namespace
|
|
1537
|
+
* instead — same property access (`t.signIn`), but each read goes through the
|
|
1538
|
+
* registry, so the active locale (and any language pack registered later)
|
|
1539
|
+
* decides the text.
|
|
1540
|
+
*
|
|
1541
|
+
* The view keeps the fallback's own keys, in its own order, and resolves every
|
|
1542
|
+
* value lazily on read: the object identity is stable per namespace + fallback,
|
|
1543
|
+
* so a card can keep passing `t` into helpers, while the strings still follow a
|
|
1544
|
+
* locale switch without remounting.
|
|
1545
|
+
*/
|
|
1546
|
+
const NOOP_SUBSCRIBE = () => () => {};
|
|
1547
|
+
const ZERO_REVISION = () => 0;
|
|
1548
|
+
let runtime;
|
|
1549
|
+
let subscribe = NOOP_SUBSCRIBE;
|
|
1550
|
+
let revision = ZERO_REVISION;
|
|
1551
|
+
const bound = /* @__PURE__ */ new Map();
|
|
1552
|
+
/**
|
|
1553
|
+
* Hand the client locale runtime to this module.
|
|
1554
|
+
*
|
|
1555
|
+
* Called once from the plugin entry, before any card mounts. Rendering without
|
|
1556
|
+
* it (unit tests that mount a card bare) keeps the dictionary's own values,
|
|
1557
|
+
* which is what those tests assert against.
|
|
1558
|
+
*
|
|
1559
|
+
* @param locale - the plugin context's locale runtime.
|
|
1560
|
+
*/
|
|
1561
|
+
function installLineLocale(locale) {
|
|
1562
|
+
runtime = locale;
|
|
1563
|
+
subscribe = typeof locale?.subscribe === "function" ? (listener) => locale.subscribe(listener) : NOOP_SUBSCRIBE;
|
|
1564
|
+
revision = typeof locale?.getSnapshot === "function" ? () => locale.getSnapshot().revision : ZERO_REVISION;
|
|
1565
|
+
bound.clear();
|
|
1566
|
+
}
|
|
1567
|
+
/** Bound translator of one namespace, or `undefined` when no locale service exists. */
|
|
1568
|
+
function translatorOf(ns) {
|
|
1569
|
+
if (runtime === void 0) return void 0;
|
|
1570
|
+
const cached = bound.get(ns);
|
|
1571
|
+
if (cached !== void 0) return cached;
|
|
1572
|
+
let translate;
|
|
1573
|
+
try {
|
|
1574
|
+
translate = runtime.bind(ns);
|
|
1575
|
+
} catch {
|
|
1576
|
+
return;
|
|
1577
|
+
}
|
|
1578
|
+
bound.set(ns, translate);
|
|
1579
|
+
return translate;
|
|
1580
|
+
}
|
|
1581
|
+
/**
|
|
1582
|
+
* Dictionary-shaped view of one namespace, resolved through the active locale.
|
|
1583
|
+
*
|
|
1584
|
+
* @param ns - the namespace the card registered its dictionaries under.
|
|
1585
|
+
* @param fallback - the card's own `zh` dictionary: source of the key set and
|
|
1586
|
+
* of the value used when no locale service is installed.
|
|
1587
|
+
* @returns the same key shape as `fallback`, with values read at render time.
|
|
1588
|
+
*/
|
|
1589
|
+
function useLineDict(ns, fallback) {
|
|
1590
|
+
(0, react.useSyncExternalStore)(subscribe, revision, revision);
|
|
1591
|
+
return (0, react.useMemo)(() => liveDict(ns, fallback), [ns, fallback]);
|
|
1592
|
+
}
|
|
1593
|
+
/** Build the lazy dictionary view: one enumerable getter per fallback key. */
|
|
1594
|
+
function liveDict(ns, fallback) {
|
|
1595
|
+
const translate = translatorOf(ns);
|
|
1596
|
+
const view = {};
|
|
1597
|
+
for (const key of Object.keys(fallback)) Object.defineProperty(view, key, {
|
|
1598
|
+
enumerable: true,
|
|
1599
|
+
configurable: false,
|
|
1600
|
+
get: () => translate === void 0 ? fallback[key] : translate(key)
|
|
1601
|
+
});
|
|
1602
|
+
return view;
|
|
1603
|
+
}
|
|
1604
|
+
//#endregion
|
|
1605
|
+
//#region src/client/common/LineProxySection.tsx
|
|
1606
|
+
/**
|
|
1607
|
+
* The proxy card one provider line owns.
|
|
1608
|
+
*
|
|
1609
|
+
* Before this component the plugin had ONE proxy setting for all thirteen
|
|
1610
|
+
* lines, rendered inside the ChatGPT card. A Chinese mixed network needs the
|
|
1611
|
+
* opposite: the foreign lines go through the local Clash, a domestic endpoint
|
|
1612
|
+
* must not. Flipping the shared setting repainted every line at once, and the
|
|
1613
|
+
* "direct" side effect (bare `fetch`) silently changed whether other middleware
|
|
1614
|
+
* saw the traffic at all.
|
|
1615
|
+
*
|
|
1616
|
+
* One component serves every line so the twelve cards cannot drift: each passes
|
|
1617
|
+
* its own provider id and reads/writes the same preference shape through the
|
|
1618
|
+
* same plugin route. The copy lives in the plugin's own namespace (zh + en
|
|
1619
|
+
* built in, ru in the language pack), so a line card does not have to carry a
|
|
1620
|
+
* second dictionary just for this section.
|
|
1621
|
+
*
|
|
1622
|
+
* The BYPASS list is deliberately NOT per-line: a bypass is a host-level fact
|
|
1623
|
+
* ("`copilot.tencent.com` is reachable directly"), and thirteen copies of it
|
|
1624
|
+
* would mean a user fixes one line and leaves twelve broken. Every card shows
|
|
1625
|
+
* the same list and says so.
|
|
1626
|
+
*
|
|
1627
|
+
* @module @eddyskywalker/dsh-chatgpt-subscription/client/common/LineProxySection
|
|
1628
|
+
*/
|
|
1629
|
+
/**
|
|
1630
|
+
* The proxy card for one provider line: mode, custom address, and the shared
|
|
1631
|
+
* bypass list.
|
|
1632
|
+
*
|
|
1633
|
+
* Drafts are local so typing does not round-trip; saving posts the field and
|
|
1634
|
+
* clears the draft once the host has answered with the canonical form (the host
|
|
1635
|
+
* normalizes the list and the URL, and what it answers is what the matcher
|
|
1636
|
+
* reads).
|
|
1637
|
+
*/
|
|
1638
|
+
function LineProxySection({ line, fetchSnapshot, onSave, idPrefix, snapshot: provided }) {
|
|
1639
|
+
const labels = useLineDict(NS, zh$15);
|
|
1640
|
+
const readSnapshotFromRoute = (0, react.useCallback)(() => (fetchSnapshot ?? (() => fetchLineProxySnapshot("/api/dsh-chatgpt-subscription")))(), [fetchSnapshot]);
|
|
1641
|
+
const writePreferences = (0, react.useCallback)((patch) => (onSave ?? ((next) => savePreferences("/api/dsh-chatgpt-subscription", next)))(patch), [onSave]);
|
|
1642
|
+
const [readSnapshot, setReadSnapshot] = (0, react.useState)(null);
|
|
1643
|
+
const snapshot = provided !== void 0 ? provided : readSnapshot;
|
|
1644
|
+
const [customDraft, setCustomDraft] = (0, react.useState)(null);
|
|
1645
|
+
const [noProxyDraft, setNoProxyDraft] = (0, react.useState)(null);
|
|
1646
|
+
const [saving, setSaving] = (0, react.useState)(null);
|
|
1647
|
+
const [error, setError] = (0, react.useState)(null);
|
|
1648
|
+
const prefix = idPrefix ?? line;
|
|
1649
|
+
const reload = (0, react.useCallback)(async () => {
|
|
1650
|
+
if (provided !== void 0) return;
|
|
1651
|
+
try {
|
|
1652
|
+
setReadSnapshot(await readSnapshotFromRoute());
|
|
1653
|
+
} catch (cause) {
|
|
1654
|
+
setError(cause instanceof Error ? cause.message : String(cause));
|
|
1655
|
+
}
|
|
1656
|
+
}, [provided, readSnapshotFromRoute]);
|
|
1657
|
+
(0, react.useEffect)(() => {
|
|
1658
|
+
reload();
|
|
1659
|
+
}, [reload]);
|
|
1660
|
+
const config = snapshot?.lineProxies?.[line] ?? null;
|
|
1661
|
+
const mode = config?.mode ?? "auto";
|
|
1662
|
+
const activeProxy = snapshot?.activeProxies?.[line] ?? null;
|
|
1663
|
+
const save = async (kind, patch) => {
|
|
1664
|
+
setSaving(kind);
|
|
1665
|
+
setError(null);
|
|
1666
|
+
try {
|
|
1667
|
+
await writePreferences(patch);
|
|
1668
|
+
if (kind === "line") setCustomDraft(null);
|
|
1669
|
+
else setNoProxyDraft(null);
|
|
1670
|
+
await reload();
|
|
1671
|
+
} catch (cause) {
|
|
1672
|
+
setError(cause instanceof Error ? cause.message : String(cause));
|
|
1673
|
+
} finally {
|
|
1674
|
+
setSaving(null);
|
|
1675
|
+
}
|
|
1676
|
+
};
|
|
1677
|
+
const saveUrl = () => {
|
|
1678
|
+
const draft = customDraft?.trim();
|
|
1679
|
+
save("line", { lineProxies: { [line]: {
|
|
1680
|
+
mode: "custom",
|
|
1681
|
+
customProxyUrl: draft ? draft : null
|
|
1682
|
+
} } });
|
|
1683
|
+
};
|
|
1684
|
+
const saveBypass = () => {
|
|
1685
|
+
const draft = noProxyDraft?.trim();
|
|
1686
|
+
save("bypass", { noProxy: draft ? draft : null });
|
|
1687
|
+
};
|
|
1688
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
1689
|
+
className: "dsha-group",
|
|
1690
|
+
"data-line-proxy": line,
|
|
1691
|
+
children: [
|
|
1692
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1693
|
+
className: "dsha-grouphead",
|
|
1694
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: labels.proxySettings })
|
|
1695
|
+
}),
|
|
1696
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1697
|
+
className: "dsha-pref-row",
|
|
1698
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: labels.proxyMode }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1699
|
+
className: "dsha-muted",
|
|
1700
|
+
children: labels.proxyModeHint
|
|
1701
|
+
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
1702
|
+
className: "dsha-select",
|
|
1703
|
+
"aria-label": labels.proxyMode,
|
|
1704
|
+
value: mode,
|
|
1705
|
+
disabled: saving !== null,
|
|
1706
|
+
onChange: (event) => {
|
|
1707
|
+
const next = event.currentTarget.value;
|
|
1708
|
+
save("line", { lineProxies: { [line]: {
|
|
1709
|
+
mode: next,
|
|
1710
|
+
customProxyUrl: next === "custom" ? config?.customProxyUrl ?? null : null
|
|
1711
|
+
} } });
|
|
1712
|
+
},
|
|
1713
|
+
children: [
|
|
1714
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1715
|
+
value: "auto",
|
|
1716
|
+
children: labels.proxyModeAuto
|
|
1717
|
+
}),
|
|
1718
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1719
|
+
value: "custom",
|
|
1720
|
+
children: labels.proxyModeCustom
|
|
1721
|
+
}),
|
|
1722
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1723
|
+
value: "direct",
|
|
1724
|
+
children: labels.proxyModeDirect
|
|
1725
|
+
})
|
|
1726
|
+
]
|
|
1727
|
+
})]
|
|
1728
|
+
}),
|
|
1729
|
+
mode === "custom" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1730
|
+
className: "dsha-context-settings",
|
|
1731
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: labels.customProxyUrl }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1732
|
+
className: "dsha-muted",
|
|
1733
|
+
children: labels.customProxyUrlHint
|
|
1734
|
+
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1735
|
+
className: "dsh-codex-proxy-control",
|
|
1736
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1737
|
+
id: `${prefix}-proxy-url`,
|
|
1738
|
+
type: "text",
|
|
1739
|
+
placeholder: labels.customProxyUrlPlaceholder,
|
|
1740
|
+
value: customDraft ?? config?.customProxyUrl ?? "",
|
|
1741
|
+
disabled: saving !== null,
|
|
1742
|
+
"aria-label": labels.customProxyUrl,
|
|
1743
|
+
onChange: (event) => setCustomDraft(event.currentTarget.value),
|
|
1744
|
+
onKeyDown: (event) => {
|
|
1745
|
+
if (event.key !== "Enter") return;
|
|
1746
|
+
event.preventDefault();
|
|
1747
|
+
saveUrl();
|
|
1748
|
+
}
|
|
1749
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1750
|
+
className: "dsha-context-save",
|
|
1751
|
+
type: "button",
|
|
1752
|
+
"aria-label": labels.saveProxyUrl,
|
|
1753
|
+
disabled: saving !== null || customDraft === null,
|
|
1754
|
+
onClick: saveUrl,
|
|
1755
|
+
children: labels.save
|
|
1756
|
+
})]
|
|
1757
|
+
}) })]
|
|
1758
|
+
}) : null,
|
|
1759
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1760
|
+
className: "dsha-muted",
|
|
1761
|
+
"data-line-proxy-active": line,
|
|
1762
|
+
children: activeProxy === null ? labels.proxyDirectActive : labels.proxyActiveTemplate.replace("{proxy}", activeProxy)
|
|
1763
|
+
}),
|
|
1764
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1765
|
+
className: "dsha-context-settings",
|
|
1766
|
+
"data-proxy-bypass": true,
|
|
1767
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: labels.noProxy }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1768
|
+
className: "dsha-muted",
|
|
1769
|
+
children: labels.noProxyHint
|
|
1770
|
+
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1771
|
+
className: "dsh-codex-proxy-control",
|
|
1772
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1773
|
+
id: `${prefix}-no-proxy`,
|
|
1774
|
+
type: "text",
|
|
1775
|
+
placeholder: labels.noProxyPlaceholder,
|
|
1776
|
+
value: noProxyDraft ?? snapshot?.noProxy ?? "",
|
|
1777
|
+
disabled: saving !== null,
|
|
1778
|
+
"aria-label": labels.noProxy,
|
|
1779
|
+
onChange: (event) => setNoProxyDraft(event.currentTarget.value),
|
|
1780
|
+
onKeyDown: (event) => {
|
|
1781
|
+
if (event.key !== "Enter") return;
|
|
1782
|
+
event.preventDefault();
|
|
1783
|
+
saveBypass();
|
|
1784
|
+
}
|
|
1785
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1786
|
+
className: "dsha-context-save",
|
|
1787
|
+
type: "button",
|
|
1788
|
+
"aria-label": labels.saveNoProxy,
|
|
1789
|
+
disabled: saving !== null || noProxyDraft === null,
|
|
1790
|
+
onClick: saveBypass,
|
|
1791
|
+
children: labels.save
|
|
1792
|
+
})]
|
|
1793
|
+
}) })]
|
|
1794
|
+
}),
|
|
1795
|
+
error === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1796
|
+
className: "dsh-codex-error",
|
|
1797
|
+
role: "status",
|
|
1798
|
+
children: error
|
|
1799
|
+
})
|
|
1800
|
+
]
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
/**
|
|
1804
|
+
* Read that snapshot from the plugin's own proxy route.
|
|
1805
|
+
*
|
|
1806
|
+
* The same route serves every card, so saving from one card and reading from
|
|
1807
|
+
* another always sees the same document.
|
|
1808
|
+
* @param base - Plugin route prefix (`ROUTE_PREFIX`).
|
|
1809
|
+
* @returns the parsed snapshot.
|
|
1810
|
+
*/
|
|
1811
|
+
async function fetchLineProxySnapshot(base) {
|
|
1812
|
+
const response = await fetch(`${base}/proxy`, { credentials: "same-origin" });
|
|
1813
|
+
const envelope = await response.json();
|
|
1814
|
+
if (!response.ok || !envelope.ok) throw new Error(envelope.ok ? `Proxy settings route failed (HTTP ${response.status})` : envelope.error.message);
|
|
1815
|
+
return envelope.value;
|
|
1816
|
+
}
|
|
1817
|
+
/**
|
|
1818
|
+
* Write one preferences patch through the plugin route.
|
|
1819
|
+
* @param base - Plugin route prefix (`ROUTE_PREFIX`).
|
|
1820
|
+
* @param patch - Preferences to merge.
|
|
1821
|
+
* @returns the refreshed preferences.
|
|
1822
|
+
*/
|
|
1823
|
+
async function savePreferences(base, patch) {
|
|
1824
|
+
const response = await fetch(`${base}/preferences/update`, {
|
|
1825
|
+
method: "POST",
|
|
1826
|
+
credentials: "same-origin",
|
|
1827
|
+
headers: { "content-type": "application/json" },
|
|
1828
|
+
body: JSON.stringify(patch)
|
|
1829
|
+
});
|
|
1830
|
+
const envelope = await response.json();
|
|
1831
|
+
if (!response.ok || !envelope.ok) throw new Error(envelope.ok ? `Saving the proxy setting failed (HTTP ${response.status})` : envelope.error.message);
|
|
1832
|
+
return envelope.value;
|
|
1833
|
+
}
|
|
1834
|
+
//#endregion
|
|
1069
1835
|
//#region src/client/common/account-quota.tsx
|
|
1070
1836
|
/**
|
|
1071
1837
|
* Percent with at most one decimal.
|
|
@@ -1732,7 +2498,6 @@ window.__ModuleLoader__.load({
|
|
|
1732
2498
|
const [resetCreditNotice, setResetCreditNotice] = (0, react.useState)(null);
|
|
1733
2499
|
const [connection, setConnection] = (0, react.useState)(null);
|
|
1734
2500
|
const [contextDrafts, setContextDrafts] = (0, react.useState)({});
|
|
1735
|
-
const [customProxyDraft, setCustomProxyDraft] = (0, react.useState)(null);
|
|
1736
2501
|
const load = (0, react.useCallback)(async (quiet = false) => {
|
|
1737
2502
|
if (!quiet) setError(null);
|
|
1738
2503
|
try {
|
|
@@ -1994,11 +2759,29 @@ window.__ModuleLoader__.load({
|
|
|
1994
2759
|
await updatePreferences({ contextWindowOverrides: Object.fromEntries(models.map((model) => [model, null])) });
|
|
1995
2760
|
setContextDrafts({});
|
|
1996
2761
|
};
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2762
|
+
/**
|
|
2763
|
+
* Read this card's proxy snapshot.
|
|
2764
|
+
*
|
|
2765
|
+
* Kept beside the tab's own status because the shared section renders from
|
|
2766
|
+
* `GET /proxy`, the same route every other line card reads: one document, one
|
|
2767
|
+
* meaning, and saving on any card is visible to the rest.
|
|
2768
|
+
*/
|
|
2769
|
+
/**
|
|
2770
|
+
* This card's proxy snapshot, taken from the status it already reads.
|
|
2771
|
+
*
|
|
2772
|
+
* The shared section can read `/proxy` on its own, but this tab answers from
|
|
2773
|
+
* one status document; a second request per render would double the polling
|
|
2774
|
+
* for data the status already carries.
|
|
2775
|
+
*/
|
|
2776
|
+
const proxySnapshot = (0, react.useMemo)(() => {
|
|
2777
|
+
if (status === null) return null;
|
|
2778
|
+
return {
|
|
2779
|
+
lineProxies: status.preferences.lineProxies ?? {},
|
|
2780
|
+
noProxy: status.preferences.noProxy ?? null,
|
|
2781
|
+
detectedProxy: status.detectedProxy ?? null,
|
|
2782
|
+
activeProxies: status.activeProxies ?? {}
|
|
2783
|
+
};
|
|
2784
|
+
}, [status]);
|
|
2002
2785
|
/**
|
|
2003
2786
|
* The shared card takes a label object while this tab translates by key, so
|
|
2004
2787
|
* every pool label is resolved through the tab's own translator and follows
|
|
@@ -2381,104 +3164,13 @@ window.__ModuleLoader__.load({
|
|
|
2381
3164
|
})
|
|
2382
3165
|
]
|
|
2383
3166
|
}),
|
|
2384
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
children: t("proxyModeHint")
|
|
2392
|
-
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
2393
|
-
className: "dsha-select",
|
|
2394
|
-
"aria-label": t("proxyMode"),
|
|
2395
|
-
value: preferences?.proxyMode ?? "auto",
|
|
2396
|
-
disabled: busy !== null,
|
|
2397
|
-
onChange: (event) => {
|
|
2398
|
-
const mode = event.currentTarget.value;
|
|
2399
|
-
setStatus((current) => current ? {
|
|
2400
|
-
...current,
|
|
2401
|
-
preferences: {
|
|
2402
|
-
...current.preferences,
|
|
2403
|
-
proxyMode: mode
|
|
2404
|
-
}
|
|
2405
|
-
} : current);
|
|
2406
|
-
updatePreferences({ proxyMode: mode });
|
|
2407
|
-
},
|
|
2408
|
-
children: [
|
|
2409
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2410
|
-
value: "auto",
|
|
2411
|
-
children: t("proxyModeAuto")
|
|
2412
|
-
}),
|
|
2413
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2414
|
-
value: "custom",
|
|
2415
|
-
children: t("proxyModeCustom")
|
|
2416
|
-
}),
|
|
2417
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2418
|
-
value: "direct",
|
|
2419
|
-
children: t("proxyModeDirect")
|
|
2420
|
-
})
|
|
2421
|
-
]
|
|
2422
|
-
})]
|
|
2423
|
-
}),
|
|
2424
|
-
(preferences?.proxyMode ?? "auto") === "auto" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2425
|
-
className: "dsh-codex-proxy-status",
|
|
2426
|
-
children: status?.detectedProxy ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
2427
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [t("proxyDetected"), ":"] }),
|
|
2428
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
2429
|
-
className: "dsh-codex-proxy-tag",
|
|
2430
|
-
children: status.detectedProxy
|
|
2431
|
-
}),
|
|
2432
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2433
|
-
className: "dsh-codex-success",
|
|
2434
|
-
children: t("proxyDetectedEffective")
|
|
2435
|
-
})
|
|
2436
|
-
] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2437
|
-
className: "dsha-muted",
|
|
2438
|
-
children: t("proxyNoneDetected")
|
|
2439
|
-
})
|
|
2440
|
-
}) : null,
|
|
2441
|
-
preferences?.proxyMode === "direct" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2442
|
-
className: "dsha-muted",
|
|
2443
|
-
style: { margin: "8px 0 0" },
|
|
2444
|
-
children: t("proxyDirectHint")
|
|
2445
|
-
}) : null,
|
|
2446
|
-
preferences?.proxyMode === "custom" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2447
|
-
className: "dsha-context-settings",
|
|
2448
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("customProxyUrl") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2449
|
-
className: "dsha-muted",
|
|
2450
|
-
children: t("customProxyUrlHint")
|
|
2451
|
-
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2452
|
-
className: "dsha-context-row",
|
|
2453
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2454
|
-
className: "dsh-codex-proxy-control",
|
|
2455
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2456
|
-
id: "dsh-codex-custom-proxy",
|
|
2457
|
-
type: "text",
|
|
2458
|
-
placeholder: t("customProxyUrlPlaceholder"),
|
|
2459
|
-
value: customProxyDraft ?? preferences?.customProxyUrl ?? "",
|
|
2460
|
-
disabled: busy !== null,
|
|
2461
|
-
"aria-label": t("customProxyUrl"),
|
|
2462
|
-
onChange: (event) => {
|
|
2463
|
-
setCustomProxyDraft(event.currentTarget.value);
|
|
2464
|
-
},
|
|
2465
|
-
onKeyDown: (event) => {
|
|
2466
|
-
if (event.key !== "Enter") return;
|
|
2467
|
-
event.preventDefault();
|
|
2468
|
-
updateCustomProxyUrl();
|
|
2469
|
-
}
|
|
2470
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2471
|
-
className: "dsha-context-save",
|
|
2472
|
-
type: "button",
|
|
2473
|
-
"aria-label": t("saveProxyUrl"),
|
|
2474
|
-
disabled: busy !== null || customProxyDraft === null,
|
|
2475
|
-
onClick: () => void updateCustomProxyUrl(),
|
|
2476
|
-
children: t("save")
|
|
2477
|
-
})]
|
|
2478
|
-
})
|
|
2479
|
-
})]
|
|
2480
|
-
}) : null
|
|
2481
|
-
]
|
|
3167
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, {
|
|
3168
|
+
line: "codex-chatgpt",
|
|
3169
|
+
idPrefix: "codex-chatgpt",
|
|
3170
|
+
snapshot: proxySnapshot,
|
|
3171
|
+
onSave: async (patch) => {
|
|
3172
|
+
await updatePreferences(patch);
|
|
3173
|
+
}
|
|
2482
3174
|
}),
|
|
2483
3175
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Section, {
|
|
2484
3176
|
title: t("enhancements"),
|
|
@@ -3056,82 +3748,6 @@ window.__ModuleLoader__.load({
|
|
|
3056
3748
|
"max"
|
|
3057
3749
|
];
|
|
3058
3750
|
//#endregion
|
|
3059
|
-
//#region src/client/common/line-locale.ts
|
|
3060
|
-
/**
|
|
3061
|
-
* Locale plumbing shared by the provider detail pages.
|
|
3062
|
-
*
|
|
3063
|
-
* Every card used to render its `zh` dictionary object directly, which pinned
|
|
3064
|
-
* the whole page to Chinese whatever the active locale was: the dictionaries
|
|
3065
|
-
* carry a complete English half, but nothing ever asked the locale service for
|
|
3066
|
-
* it. A card now renders a dictionary-shaped view of the registered namespace
|
|
3067
|
-
* instead — same property access (`t.signIn`), but each read goes through the
|
|
3068
|
-
* registry, so the active locale (and any language pack registered later)
|
|
3069
|
-
* decides the text.
|
|
3070
|
-
*
|
|
3071
|
-
* The view keeps the fallback's own keys, in its own order, and resolves every
|
|
3072
|
-
* value lazily on read: the object identity is stable per namespace + fallback,
|
|
3073
|
-
* so a card can keep passing `t` into helpers, while the strings still follow a
|
|
3074
|
-
* locale switch without remounting.
|
|
3075
|
-
*/
|
|
3076
|
-
const NOOP_SUBSCRIBE = () => () => {};
|
|
3077
|
-
const ZERO_REVISION = () => 0;
|
|
3078
|
-
let runtime;
|
|
3079
|
-
let subscribe = NOOP_SUBSCRIBE;
|
|
3080
|
-
let revision = ZERO_REVISION;
|
|
3081
|
-
const bound = /* @__PURE__ */ new Map();
|
|
3082
|
-
/**
|
|
3083
|
-
* Hand the client locale runtime to this module.
|
|
3084
|
-
*
|
|
3085
|
-
* Called once from the plugin entry, before any card mounts. Rendering without
|
|
3086
|
-
* it (unit tests that mount a card bare) keeps the dictionary's own values,
|
|
3087
|
-
* which is what those tests assert against.
|
|
3088
|
-
*
|
|
3089
|
-
* @param locale - the plugin context's locale runtime.
|
|
3090
|
-
*/
|
|
3091
|
-
function installLineLocale(locale) {
|
|
3092
|
-
runtime = locale;
|
|
3093
|
-
subscribe = typeof locale?.subscribe === "function" ? (listener) => locale.subscribe(listener) : NOOP_SUBSCRIBE;
|
|
3094
|
-
revision = typeof locale?.getSnapshot === "function" ? () => locale.getSnapshot().revision : ZERO_REVISION;
|
|
3095
|
-
bound.clear();
|
|
3096
|
-
}
|
|
3097
|
-
/** Bound translator of one namespace, or `undefined` when no locale service exists. */
|
|
3098
|
-
function translatorOf(ns) {
|
|
3099
|
-
if (runtime === void 0) return void 0;
|
|
3100
|
-
const cached = bound.get(ns);
|
|
3101
|
-
if (cached !== void 0) return cached;
|
|
3102
|
-
let translate;
|
|
3103
|
-
try {
|
|
3104
|
-
translate = runtime.bind(ns);
|
|
3105
|
-
} catch {
|
|
3106
|
-
return;
|
|
3107
|
-
}
|
|
3108
|
-
bound.set(ns, translate);
|
|
3109
|
-
return translate;
|
|
3110
|
-
}
|
|
3111
|
-
/**
|
|
3112
|
-
* Dictionary-shaped view of one namespace, resolved through the active locale.
|
|
3113
|
-
*
|
|
3114
|
-
* @param ns - the namespace the card registered its dictionaries under.
|
|
3115
|
-
* @param fallback - the card's own `zh` dictionary: source of the key set and
|
|
3116
|
-
* of the value used when no locale service is installed.
|
|
3117
|
-
* @returns the same key shape as `fallback`, with values read at render time.
|
|
3118
|
-
*/
|
|
3119
|
-
function useLineDict(ns, fallback) {
|
|
3120
|
-
(0, react.useSyncExternalStore)(subscribe, revision, revision);
|
|
3121
|
-
return (0, react.useMemo)(() => liveDict(ns, fallback), [ns, fallback]);
|
|
3122
|
-
}
|
|
3123
|
-
/** Build the lazy dictionary view: one enumerable getter per fallback key. */
|
|
3124
|
-
function liveDict(ns, fallback) {
|
|
3125
|
-
const translate = translatorOf(ns);
|
|
3126
|
-
const view = {};
|
|
3127
|
-
for (const key of Object.keys(fallback)) Object.defineProperty(view, key, {
|
|
3128
|
-
enumerable: true,
|
|
3129
|
-
configurable: false,
|
|
3130
|
-
get: () => translate === void 0 ? fallback[key] : translate(key)
|
|
3131
|
-
});
|
|
3132
|
-
return view;
|
|
3133
|
-
}
|
|
3134
|
-
//#endregion
|
|
3135
3751
|
//#region src/client/common/ContextWindowEditor.tsx
|
|
3136
3752
|
/**
|
|
3137
3753
|
* The shared "model context windows" block every provider settings card renders.
|
|
@@ -3276,7 +3892,7 @@ window.__ModuleLoader__.load({
|
|
|
3276
3892
|
//#endregion
|
|
3277
3893
|
//#region src/client/command-code/locales.ts
|
|
3278
3894
|
const NS_COMMAND_CODE = "dsh-command-code";
|
|
3279
|
-
const zh$
|
|
3895
|
+
const zh$14 = {
|
|
3280
3896
|
...accountPoolZh,
|
|
3281
3897
|
title: "Command Code",
|
|
3282
3898
|
pageDesc: "登录 Command Code,管理可用模型、上下文窗口与额度。",
|
|
@@ -3344,7 +3960,7 @@ window.__ModuleLoader__.load({
|
|
|
3344
3960
|
loginFailed: "登录失败",
|
|
3345
3961
|
tokens: "tokens"
|
|
3346
3962
|
};
|
|
3347
|
-
const en$
|
|
3963
|
+
const en$14 = {
|
|
3348
3964
|
...accountPoolEn,
|
|
3349
3965
|
title: "Command Code",
|
|
3350
3966
|
pageDesc: "Sign in to Command Code and manage models, context windows, and quota.",
|
|
@@ -3412,11 +4028,11 @@ window.__ModuleLoader__.load({
|
|
|
3412
4028
|
loginFailed: "Sign-in failed",
|
|
3413
4029
|
tokens: "tokens"
|
|
3414
4030
|
};
|
|
3415
|
-
const dictionaries$
|
|
3416
|
-
zh: zh$
|
|
3417
|
-
"zh-CN": zh$
|
|
3418
|
-
en: en$
|
|
3419
|
-
"en-US": en$
|
|
4031
|
+
const dictionaries$14 = {
|
|
4032
|
+
zh: zh$14,
|
|
4033
|
+
"zh-CN": zh$14,
|
|
4034
|
+
en: en$14,
|
|
4035
|
+
"en-US": en$14
|
|
3420
4036
|
};
|
|
3421
4037
|
//#endregion
|
|
3422
4038
|
//#region src/client/command-code/CommandCodeSection.tsx
|
|
@@ -3457,7 +4073,7 @@ window.__ModuleLoader__.load({
|
|
|
3457
4073
|
const [apiKey, setApiKey] = (0, react.useState)("");
|
|
3458
4074
|
/** Follow-up poll owed while the host refreshes the quota behind an answer. */
|
|
3459
4075
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
3460
|
-
const t = useLineDict(NS_COMMAND_CODE, zh$
|
|
4076
|
+
const t = useLineDict(NS_COMMAND_CODE, zh$14);
|
|
3461
4077
|
const notifyChange = (0, react.useCallback)(() => {
|
|
3462
4078
|
onModelChange?.();
|
|
3463
4079
|
loadModelDirectory?.();
|
|
@@ -4019,6 +4635,7 @@ window.__ModuleLoader__.load({
|
|
|
4019
4635
|
})
|
|
4020
4636
|
]
|
|
4021
4637
|
}),
|
|
4638
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "command-code" }),
|
|
4022
4639
|
error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4023
4640
|
className: "dsha-error",
|
|
4024
4641
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: error })
|
|
@@ -4218,7 +4835,7 @@ window.__ModuleLoader__.load({
|
|
|
4218
4835
|
//#endregion
|
|
4219
4836
|
//#region src/client/kimi-code/locales.ts
|
|
4220
4837
|
const NS_KIMI_CODE = "dsh-kimi-code";
|
|
4221
|
-
const zh$
|
|
4838
|
+
const zh$13 = {
|
|
4222
4839
|
...accountPoolZh,
|
|
4223
4840
|
title: "Kimi Code",
|
|
4224
4841
|
pageDesc: "登录 Kimi Code 订阅,管理模型、思考档位、上下文窗口与额度。",
|
|
@@ -4405,7 +5022,7 @@ window.__ModuleLoader__.load({
|
|
|
4405
5022
|
compactionRouteNoImage: "该模型不接受图片:摘要里的截图会被替换为占位文本。",
|
|
4406
5023
|
compactionRouteEmpty: "没有可用的线路——先登录任意一条线路再回来设置。"
|
|
4407
5024
|
};
|
|
4408
|
-
const en$
|
|
5025
|
+
const en$13 = {
|
|
4409
5026
|
...accountPoolEn,
|
|
4410
5027
|
title: "Kimi Code",
|
|
4411
5028
|
pageDesc: "Sign in to the Kimi Code subscription and manage models, thinking level, context windows, and quota.",
|
|
@@ -4592,11 +5209,11 @@ window.__ModuleLoader__.load({
|
|
|
4592
5209
|
compactionRouteNoImage: "This model takes no images: screenshots become placeholder text in the summary.",
|
|
4593
5210
|
compactionRouteEmpty: "No route is available — sign in to one first."
|
|
4594
5211
|
};
|
|
4595
|
-
const dictionaries$
|
|
4596
|
-
zh: zh$
|
|
4597
|
-
"zh-CN": zh$
|
|
4598
|
-
en: en$
|
|
4599
|
-
"en-US": en$
|
|
5212
|
+
const dictionaries$13 = {
|
|
5213
|
+
zh: zh$13,
|
|
5214
|
+
"zh-CN": zh$13,
|
|
5215
|
+
en: en$13,
|
|
5216
|
+
"en-US": en$13
|
|
4600
5217
|
};
|
|
4601
5218
|
//#endregion
|
|
4602
5219
|
//#region src/shared/kimi-code-contracts.ts
|
|
@@ -4708,7 +5325,7 @@ window.__ModuleLoader__.load({
|
|
|
4708
5325
|
return `${value}x`;
|
|
4709
5326
|
}
|
|
4710
5327
|
function KimiModelCapabilities({ models }) {
|
|
4711
|
-
const t = useLineDict(NS_KIMI_CODE, zh$
|
|
5328
|
+
const t = useLineDict(NS_KIMI_CODE, zh$13);
|
|
4712
5329
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4713
5330
|
className: "dsha-cap-table",
|
|
4714
5331
|
children: [
|
|
@@ -5237,7 +5854,7 @@ window.__ModuleLoader__.load({
|
|
|
5237
5854
|
statusGeneration.current += 1;
|
|
5238
5855
|
setStatus(next);
|
|
5239
5856
|
}, []);
|
|
5240
|
-
const t = useLineDict(NS_KIMI_CODE, zh$
|
|
5857
|
+
const t = useLineDict(NS_KIMI_CODE, zh$13);
|
|
5241
5858
|
const notifyChange = (0, react.useCallback)(() => {
|
|
5242
5859
|
onModelChange?.();
|
|
5243
5860
|
loadModelDirectory?.();
|
|
@@ -5993,6 +6610,7 @@ window.__ModuleLoader__.load({
|
|
|
5993
6610
|
})
|
|
5994
6611
|
]
|
|
5995
6612
|
}),
|
|
6613
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "kimi-code" }),
|
|
5996
6614
|
error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5997
6615
|
className: "dsha-error",
|
|
5998
6616
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: error })
|
|
@@ -6045,7 +6663,7 @@ window.__ModuleLoader__.load({
|
|
|
6045
6663
|
//#endregion
|
|
6046
6664
|
//#region src/client/minimax-code/locales.ts
|
|
6047
6665
|
const NS_MINIMAX_CODE = "dsh-minimax-code";
|
|
6048
|
-
const zh$
|
|
6666
|
+
const zh$12 = {
|
|
6049
6667
|
...accountPoolZh,
|
|
6050
6668
|
title: "MiniMax Code",
|
|
6051
6669
|
pageDesc: "登录 MiniMax Code 编程订阅(设备码 OAuth),复用本机 MiniMax Code 的登录态,管理账号、连接与模型。",
|
|
@@ -6243,7 +6861,7 @@ window.__ModuleLoader__.load({
|
|
|
6243
6861
|
videoHistoryEncrypted: "已由系统凭据后端加密",
|
|
6244
6862
|
videoHistoryPlain: "本机没有可用的凭据后端,记录为明文"
|
|
6245
6863
|
};
|
|
6246
|
-
const en$
|
|
6864
|
+
const en$12 = {
|
|
6247
6865
|
...accountPoolEn,
|
|
6248
6866
|
title: "MiniMax Code",
|
|
6249
6867
|
pageDesc: "Sign in to the MiniMax Code coding subscription (device-code OAuth) and reuse the local MiniMax Code sign-in to manage the account, connection, and models.",
|
|
@@ -6441,11 +7059,11 @@ window.__ModuleLoader__.load({
|
|
|
6441
7059
|
videoHistoryEncrypted: "Encrypted by the platform credential backend",
|
|
6442
7060
|
videoHistoryPlain: "No credential backend on this host; stored as plain text"
|
|
6443
7061
|
};
|
|
6444
|
-
const dictionaries$
|
|
6445
|
-
zh: zh$
|
|
6446
|
-
"zh-CN": zh$
|
|
6447
|
-
en: en$
|
|
6448
|
-
"en-US": en$
|
|
7062
|
+
const dictionaries$12 = {
|
|
7063
|
+
zh: zh$12,
|
|
7064
|
+
"zh-CN": zh$12,
|
|
7065
|
+
en: en$12,
|
|
7066
|
+
"en-US": en$12
|
|
6449
7067
|
};
|
|
6450
7068
|
//#endregion
|
|
6451
7069
|
//#region src/client/minimax-code/useMinimaxCodeSection.ts
|
|
@@ -6459,7 +7077,7 @@ window.__ModuleLoader__.load({
|
|
|
6459
7077
|
* rather than inferred from the JSX.
|
|
6460
7078
|
*/
|
|
6461
7079
|
/** The card's own dictionary; stable identity keeps effect dependencies intact. */
|
|
6462
|
-
const fallbackTranslate$7 = (key) => zh$
|
|
7080
|
+
const fallbackTranslate$7 = (key) => zh$12[key];
|
|
6463
7081
|
/**
|
|
6464
7082
|
* The shared pool card's labels, resolved through this card's dictionary.
|
|
6465
7083
|
*
|
|
@@ -8500,6 +9118,7 @@ window.__ModuleLoader__.load({
|
|
|
8500
9118
|
onSave: saveVideoDefaults
|
|
8501
9119
|
}),
|
|
8502
9120
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VideoHistorySection, { t }),
|
|
9121
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "minimax-code" }),
|
|
8503
9122
|
error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8504
9123
|
className: "dsha-error",
|
|
8505
9124
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: error })
|
|
@@ -8517,7 +9136,7 @@ window.__ModuleLoader__.load({
|
|
|
8517
9136
|
* 键名重合的会被渲染成 ChatGPT 的措辞,不重合的会把键名本身打印出来)。
|
|
8518
9137
|
*/
|
|
8519
9138
|
const NS_GLM_CODING_PLAN = "dsh-glm-coding-plan";
|
|
8520
|
-
const zh$
|
|
9139
|
+
const zh$11 = {
|
|
8521
9140
|
...accountPoolZh,
|
|
8522
9141
|
title: "GLM(ZCode 账号)",
|
|
8523
9142
|
pageDesc: "用 ZCode 账号授权接入 GLM Coding Plan(国区 bigmodel.cn / 国际区 z.ai),管理账号池、套餐额度与模型勾选。两个区域的凭据各自独立,池内可以同时存在两区账号。",
|
|
@@ -8611,7 +9230,7 @@ window.__ModuleLoader__.load({
|
|
|
8611
9230
|
quotaAllowanceUnknown: "未判定",
|
|
8612
9231
|
quotaAllowanceHint: "登录时探活认定的额度来源。「免费体验额度」指新用户注册后自动获得、首次使用起 5 天内每天 800 万 token 的体验额度。"
|
|
8613
9232
|
};
|
|
8614
|
-
const en$
|
|
9233
|
+
const en$11 = {
|
|
8615
9234
|
...accountPoolEn,
|
|
8616
9235
|
title: "GLM (ZCode account)",
|
|
8617
9236
|
pageDesc: "Sign in with a ZCode account to reach GLM Coding Plan (China bigmodel.cn / International z.ai), and manage the account pool, plan quota and model selection. The two regions hold independent credentials, so a pool can carry accounts from both.",
|
|
@@ -8705,11 +9324,11 @@ window.__ModuleLoader__.load({
|
|
|
8705
9324
|
quotaAllowanceUnknown: "Undetermined",
|
|
8706
9325
|
quotaAllowanceHint: "The allowance source established by the sign-in probe. “Free trial allowance” means 8M tokens per day for 5 days from first use, granted automatically to new accounts."
|
|
8707
9326
|
};
|
|
8708
|
-
const dictionaries$
|
|
8709
|
-
zh: zh$
|
|
8710
|
-
"zh-CN": zh$
|
|
8711
|
-
en: en$
|
|
8712
|
-
"en-US": en$
|
|
9327
|
+
const dictionaries$11 = {
|
|
9328
|
+
zh: zh$11,
|
|
9329
|
+
"zh-CN": zh$11,
|
|
9330
|
+
en: en$11,
|
|
9331
|
+
"en-US": en$11
|
|
8713
9332
|
};
|
|
8714
9333
|
/** 一个配额窗口的键到「窗口长度(分钟)」的映射。 */
|
|
8715
9334
|
const QUOTA_WINDOW_MINUTES$1 = {
|
|
@@ -8790,7 +9409,7 @@ window.__ModuleLoader__.load({
|
|
|
8790
9409
|
/** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
|
|
8791
9410
|
const LOGIN_POLL_INTERVAL_MS$2 = 2e3;
|
|
8792
9411
|
/** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
|
|
8793
|
-
const fallbackTranslate$6 = (key) => zh$
|
|
9412
|
+
const fallbackTranslate$6 = (key) => zh$11[key];
|
|
8794
9413
|
/**
|
|
8795
9414
|
* 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
|
|
8796
9415
|
*
|
|
@@ -9216,7 +9835,7 @@ window.__ModuleLoader__.load({
|
|
|
9216
9835
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
|
|
9217
9836
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels } = derived;
|
|
9218
9837
|
const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, refreshQuota, refreshCatalog, testConnection } = actions;
|
|
9219
|
-
const t = useLineDict(NS_GLM_CODING_PLAN, zh$
|
|
9838
|
+
const t = useLineDict(NS_GLM_CODING_PLAN, zh$11);
|
|
9220
9839
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9221
9840
|
className: "dsha-page",
|
|
9222
9841
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -9636,6 +10255,7 @@ window.__ModuleLoader__.load({
|
|
|
9636
10255
|
})
|
|
9637
10256
|
]
|
|
9638
10257
|
}),
|
|
10258
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "glm-coding-plan" }),
|
|
9639
10259
|
error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9640
10260
|
className: "dsha-error",
|
|
9641
10261
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: error })
|
|
@@ -9681,7 +10301,7 @@ window.__ModuleLoader__.load({
|
|
|
9681
10301
|
* provider — the same reason every sibling line has one.
|
|
9682
10302
|
*/
|
|
9683
10303
|
const NS_CLAUDE = "dsh-claude";
|
|
9684
|
-
const zh$
|
|
10304
|
+
const zh$10 = {
|
|
9685
10305
|
...accountPoolZh,
|
|
9686
10306
|
title: "Claude(订阅)",
|
|
9687
10307
|
pageDesc: "登录 Claude Pro/Max 订阅,管理模型、思考档位、上下文窗口与额度。",
|
|
@@ -9798,7 +10418,7 @@ window.__ModuleLoader__.load({
|
|
|
9798
10418
|
copy: "复制",
|
|
9799
10419
|
copied: "已复制"
|
|
9800
10420
|
};
|
|
9801
|
-
const en$
|
|
10421
|
+
const en$10 = {
|
|
9802
10422
|
...accountPoolEn,
|
|
9803
10423
|
title: "Claude (subscription)",
|
|
9804
10424
|
pageDesc: "Sign in to a Claude Pro/Max subscription and manage models, thinking levels, context windows and quota.",
|
|
@@ -9915,11 +10535,11 @@ window.__ModuleLoader__.load({
|
|
|
9915
10535
|
copy: "Copy",
|
|
9916
10536
|
copied: "Copied"
|
|
9917
10537
|
};
|
|
9918
|
-
const dictionaries$
|
|
9919
|
-
zh: zh$
|
|
9920
|
-
"zh-CN": zh$
|
|
9921
|
-
en: en$
|
|
9922
|
-
"en-US": en$
|
|
10538
|
+
const dictionaries$10 = {
|
|
10539
|
+
zh: zh$10,
|
|
10540
|
+
"zh-CN": zh$10,
|
|
10541
|
+
en: en$10,
|
|
10542
|
+
"en-US": en$10
|
|
9923
10543
|
};
|
|
9924
10544
|
//#endregion
|
|
9925
10545
|
//#region src/client/claude/useClaudeSection.ts
|
|
@@ -9953,7 +10573,7 @@ window.__ModuleLoader__.load({
|
|
|
9953
10573
|
const [connection, setConnection] = (0, react.useState)(null);
|
|
9954
10574
|
/** Follow-up poll owed while the host refreshes the quota behind an answer. */
|
|
9955
10575
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
9956
|
-
const t = useLineDict(NS_CLAUDE, zh$
|
|
10576
|
+
const t = useLineDict(NS_CLAUDE, zh$10);
|
|
9957
10577
|
const notifyChange = (0, react.useCallback)(() => {
|
|
9958
10578
|
onModelChange?.();
|
|
9959
10579
|
loadModelDirectory?.();
|
|
@@ -10400,11 +11020,11 @@ window.__ModuleLoader__.load({
|
|
|
10400
11020
|
* out here would hide a choice the host would accept and a catalog may expose.
|
|
10401
11021
|
*/
|
|
10402
11022
|
const EFFORT_LABELS$2 = {
|
|
10403
|
-
low: zh$
|
|
10404
|
-
medium: zh$
|
|
10405
|
-
high: zh$
|
|
10406
|
-
xhigh: zh$
|
|
10407
|
-
max: zh$
|
|
11023
|
+
low: zh$10.effortLow,
|
|
11024
|
+
medium: zh$10.effortMedium,
|
|
11025
|
+
high: zh$10.effortHigh,
|
|
11026
|
+
xhigh: zh$10.effortXHigh,
|
|
11027
|
+
max: zh$10.effortMax
|
|
10408
11028
|
};
|
|
10409
11029
|
/** One-line capability summary shown as a model pill's hover title. */
|
|
10410
11030
|
function modelFacts(model, t) {
|
|
@@ -10425,7 +11045,7 @@ window.__ModuleLoader__.load({
|
|
|
10425
11045
|
const { status, loading, busy, error, flow, connection, pasteValue, contextDrafts, savingModel } = state;
|
|
10426
11046
|
const { accounts, hasAdopted, contextModels, overrideCount, quota, windows, poolLabels } = derived;
|
|
10427
11047
|
const { login, cancelLogin, submitPaste, adopt, stopImporting, accountAction, setStrategy, relogin, refreshQuota, refreshCatalog, testConnection, toggleModel, setAllModels, updateEffort, updateCacheTtl, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setPasteValue } = actions;
|
|
10428
|
-
const t = useLineDict(NS_CLAUDE, zh$
|
|
11048
|
+
const t = useLineDict(NS_CLAUDE, zh$10);
|
|
10429
11049
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10430
11050
|
className: "dsha-page",
|
|
10431
11051
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -10875,6 +11495,7 @@ window.__ModuleLoader__.load({
|
|
|
10875
11495
|
})
|
|
10876
11496
|
]
|
|
10877
11497
|
}),
|
|
11498
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "claude-subscription" }),
|
|
10878
11499
|
error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10879
11500
|
className: "dsha-error",
|
|
10880
11501
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: error })
|
|
@@ -11016,7 +11637,7 @@ window.__ModuleLoader__.load({
|
|
|
11016
11637
|
//#endregion
|
|
11017
11638
|
//#region src/client/ollama/locales.ts
|
|
11018
11639
|
const NS_OLLAMA = "dsh-ollama";
|
|
11019
|
-
const zh$
|
|
11640
|
+
const zh$9 = {
|
|
11020
11641
|
...accountPoolZh,
|
|
11021
11642
|
relogin: "更换 Key",
|
|
11022
11643
|
needsRelogin: "Key 已失效",
|
|
@@ -11068,7 +11689,7 @@ window.__ModuleLoader__.load({
|
|
|
11068
11689
|
usageNone: "尚无请求",
|
|
11069
11690
|
usageHint: "按 Ollama 每次响应自带的 token 计数本地累加。"
|
|
11070
11691
|
};
|
|
11071
|
-
const en$
|
|
11692
|
+
const en$9 = {
|
|
11072
11693
|
...accountPoolEn,
|
|
11073
11694
|
relogin: "Replace Key",
|
|
11074
11695
|
needsRelogin: "Key rejected",
|
|
@@ -11120,11 +11741,11 @@ window.__ModuleLoader__.load({
|
|
|
11120
11741
|
usageNone: "No requests yet",
|
|
11121
11742
|
usageHint: "Summed locally from the token counts Ollama returns on each response."
|
|
11122
11743
|
};
|
|
11123
|
-
const dictionaries$
|
|
11124
|
-
zh: zh$
|
|
11125
|
-
"zh-CN": zh$
|
|
11126
|
-
en: en$
|
|
11127
|
-
"en-US": en$
|
|
11744
|
+
const dictionaries$9 = {
|
|
11745
|
+
zh: zh$9,
|
|
11746
|
+
"zh-CN": zh$9,
|
|
11747
|
+
en: en$9,
|
|
11748
|
+
"en-US": en$9
|
|
11128
11749
|
};
|
|
11129
11750
|
//#endregion
|
|
11130
11751
|
//#region src/client/ollama/OllamaSection.tsx
|
|
@@ -11250,7 +11871,7 @@ window.__ModuleLoader__.load({
|
|
|
11250
11871
|
const setEffort = (0, react.useCallback)((value) => {
|
|
11251
11872
|
run("effort", () => API$8.setDefaultReasoningEffort(value === "" ? null : value));
|
|
11252
11873
|
}, [run]);
|
|
11253
|
-
const t = useLineDict(NS_OLLAMA, zh$
|
|
11874
|
+
const t = useLineDict(NS_OLLAMA, zh$9);
|
|
11254
11875
|
const pool = status?.pool;
|
|
11255
11876
|
const models = status?.models ?? [];
|
|
11256
11877
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
@@ -11365,7 +11986,7 @@ window.__ModuleLoader__.load({
|
|
|
11365
11986
|
className: "dsha-btn",
|
|
11366
11987
|
disabled: busy !== null,
|
|
11367
11988
|
onClick: () => setShowKeyForm(false),
|
|
11368
|
-
children: zh$
|
|
11989
|
+
children: zh$9.deleteAccount
|
|
11369
11990
|
})]
|
|
11370
11991
|
})
|
|
11371
11992
|
]
|
|
@@ -11472,7 +12093,8 @@ window.__ModuleLoader__.load({
|
|
|
11472
12093
|
]
|
|
11473
12094
|
})
|
|
11474
12095
|
]
|
|
11475
|
-
})
|
|
12096
|
+
}),
|
|
12097
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "ollama" })
|
|
11476
12098
|
] });
|
|
11477
12099
|
}
|
|
11478
12100
|
//#endregion
|
|
@@ -11563,7 +12185,7 @@ window.__ModuleLoader__.load({
|
|
|
11563
12185
|
//#endregion
|
|
11564
12186
|
//#region src/client/antigravity-acp/locales.ts
|
|
11565
12187
|
const NS_ANTIGRAVITY_ACP = "dsh-antigravity-acp";
|
|
11566
|
-
const zh$
|
|
12188
|
+
const zh$8 = {
|
|
11567
12189
|
title: "Antigravity(ACP)",
|
|
11568
12190
|
pageDesc: "通过 Google 官方 Antigravity CLI 的 Agent Client Protocol(ACP)接入:模型、工具与会话全部由官方进程驱动,登录态由官方进程自己保管。",
|
|
11569
12191
|
routeOwned: "模型路由由本插件提供",
|
|
@@ -11647,6 +12269,7 @@ window.__ModuleLoader__.load({
|
|
|
11647
12269
|
scopeHistory: "正常结束后会话随进程一起停放供下次复用:下一条消息若前缀指纹与工具目录未变,只发送增量;历史被压缩或改写、工具集变化或进程死亡时才重建会话并重放带锚点的历史。",
|
|
11648
12270
|
scopeTools: "作为主模型时工具由 DSH 执行并把关;作为子代理时子进程使用官方 Agent 自己的工具集。",
|
|
11649
12271
|
scopeQuota: "官方服务端不公布剩余额度,因此本卡片不显示任何百分比或余额。",
|
|
12272
|
+
scopeNetwork: "本线路的网络请求由官方 CLI(agy)自己管理,插件无法为它单独指定代理;这里的代理设置也不会作用于它。",
|
|
11650
12273
|
error: "操作失败:{detail}",
|
|
11651
12274
|
complianceSummary: "条款风险(点开查看)",
|
|
11652
12275
|
complianceNotice: "⚠️ 条款风险:Google Antigravity 官方 FAQ 明确写着「使用第三方软件、工具或服务访问 Antigravity 违反其服务条款」,且「把 agy 包装进第三方编码 Agent 或应用、或自动化账号轮换,在消费者套餐下不受支持」,可能导致账号被暂停或终止。本插件运行的是 Google 官方 agy 与官方 ACP 服务器(不逆向协议、不读取凭据、单账号不轮换),但这些措施不能消除条款风险。是否继续使用请自行判断;需要零争议时请改用 Gemini Enterprise 或 Google AI Studio API Key。",
|
|
@@ -11654,7 +12277,7 @@ window.__ModuleLoader__.load({
|
|
|
11654
12277
|
enabledHint: "该线路当前已启用。",
|
|
11655
12278
|
toggleHint: "可在「订阅服务」总览页的该线路卡片上随时停用。"
|
|
11656
12279
|
};
|
|
11657
|
-
const en$
|
|
12280
|
+
const en$8 = {
|
|
11658
12281
|
title: "Antigravity (ACP)",
|
|
11659
12282
|
pageDesc: "Connect through Google's official Antigravity CLI over the Agent Client Protocol (ACP): the model, its tools and its sessions all come from the official process, which also keeps its own sign-in state.",
|
|
11660
12283
|
routeOwned: "Model route served by this plugin",
|
|
@@ -11738,6 +12361,7 @@ window.__ModuleLoader__.load({
|
|
|
11738
12361
|
scopeHistory: "After a normal finish the session parks with its process for reuse: the next message sends only the increment if the prefix fingerprint and tool catalogue are unchanged, and only a compacted or rewritten history, a changed tool set, or a dead process triggers a rebuild with an anchored replay.",
|
|
11739
12362
|
scopeTools: "As a main model its tool calls are executed and gated by DSH; as a subagent the child runs the official agent's own tools.",
|
|
11740
12363
|
scopeQuota: "The official server publishes no remaining quota, so this card shows no percentage and no balance.",
|
|
12364
|
+
scopeNetwork: "This line's network requests are managed by the official CLI (agy) itself; the plugin cannot give it a separate proxy, and the proxy settings elsewhere do not apply to it.",
|
|
11741
12365
|
error: "Action failed: {detail}",
|
|
11742
12366
|
complianceSummary: "Terms risk (click to read)",
|
|
11743
12367
|
complianceNotice: "Terms risk: Google Antigravity's official FAQ states that accessing Antigravity through third-party software, tools, or services violates its Terms of Service, and that wrapping agy inside third-party coding agents or applications, or automating account rotation, is not supported under consumer plans - either can result in suspension or termination of your account. This plugin runs Google's own agy CLI and official ACP server (no protocol reverse-engineering, no credential access, single account, no rotation), but those measures do not remove the risk. Whether to keep using it is your decision; where a zero-controversy setup is required, use a Gemini Enterprise or Google AI Studio API key instead.",
|
|
@@ -11745,11 +12369,11 @@ window.__ModuleLoader__.load({
|
|
|
11745
12369
|
enabledHint: "This line is enabled.",
|
|
11746
12370
|
toggleHint: "You can switch it off at any time from its card in the subscription overview."
|
|
11747
12371
|
};
|
|
11748
|
-
const dictionaries$
|
|
11749
|
-
zh: zh$
|
|
11750
|
-
"zh-CN": zh$
|
|
11751
|
-
en: en$
|
|
11752
|
-
"en-US": en$
|
|
12372
|
+
const dictionaries$8 = {
|
|
12373
|
+
zh: zh$8,
|
|
12374
|
+
"zh-CN": zh$8,
|
|
12375
|
+
en: en$8,
|
|
12376
|
+
"en-US": en$8
|
|
11753
12377
|
};
|
|
11754
12378
|
//#endregion
|
|
11755
12379
|
//#region src/client/antigravity-acp/AntigravityAcpSection.tsx
|
|
@@ -11806,7 +12430,7 @@ window.__ModuleLoader__.load({
|
|
|
11806
12430
|
setBusy(null);
|
|
11807
12431
|
}
|
|
11808
12432
|
}, [props]);
|
|
11809
|
-
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$
|
|
12433
|
+
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$8);
|
|
11810
12434
|
const models = status?.models ?? [];
|
|
11811
12435
|
const auth = status?.auth;
|
|
11812
12436
|
const usage = status?.usage;
|
|
@@ -12267,7 +12891,8 @@ window.__ModuleLoader__.load({
|
|
|
12267
12891
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t.scopePrompt }),
|
|
12268
12892
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t.scopeHistory }),
|
|
12269
12893
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t.scopeTools }),
|
|
12270
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t.scopeQuota })
|
|
12894
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t.scopeQuota }),
|
|
12895
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t.scopeNetwork })
|
|
12271
12896
|
]
|
|
12272
12897
|
})]
|
|
12273
12898
|
})
|
|
@@ -12296,7 +12921,7 @@ window.__ModuleLoader__.load({
|
|
|
12296
12921
|
* 键名重合的会被渲染成 ChatGPT 的措辞,不重合的会把键名本身打印出来)。
|
|
12297
12922
|
*/
|
|
12298
12923
|
const NS_STEP_CODE = "dsh-step-code";
|
|
12299
|
-
const zh$
|
|
12924
|
+
const zh$7 = {
|
|
12300
12925
|
...accountPoolZh,
|
|
12301
12926
|
title: "Step Code(Step Plan 订阅)",
|
|
12302
12927
|
pageDesc: "用 StepFun 的 Step Plan 订阅(国区 api.stepfun.com / 国际区 api.stepfun.ai)或开放平台 API Key 接入,管理账号池、套餐额度、缓存用量与模型勾选。区域是凭据的属性,两区凭据互不通用,因此号池里可以同时存在两区账号。",
|
|
@@ -12466,7 +13091,7 @@ window.__ModuleLoader__.load({
|
|
|
12466
13091
|
cacheExpiredHint: "缓存可能已过期:距上次请求约 {minutes} 分钟,下次会重新处理前缀。",
|
|
12467
13092
|
cacheHitRatioUnavailable: "—"
|
|
12468
13093
|
};
|
|
12469
|
-
const en$
|
|
13094
|
+
const en$7 = {
|
|
12470
13095
|
...accountPoolEn,
|
|
12471
13096
|
title: "Step Code (Step Plan subscription)",
|
|
12472
13097
|
pageDesc: "Reach StepFun with a Step Plan subscription (China api.stepfun.com / international api.stepfun.ai) or an open-platform API key, and manage the account pool, plan quota, cache usage and model selection. A region is a property of the credential and the two never share, so a pool can carry accounts from both.",
|
|
@@ -12634,11 +13259,11 @@ window.__ModuleLoader__.load({
|
|
|
12634
13259
|
cacheExpiredHint: "The cache has likely expired: about {minutes} minutes since the last request, so the next turn will reprocess the prefix.",
|
|
12635
13260
|
cacheHitRatioUnavailable: "—"
|
|
12636
13261
|
};
|
|
12637
|
-
const dictionaries$
|
|
12638
|
-
zh: zh$
|
|
12639
|
-
"zh-CN": zh$
|
|
12640
|
-
en: en$
|
|
12641
|
-
"en-US": en$
|
|
13262
|
+
const dictionaries$7 = {
|
|
13263
|
+
zh: zh$7,
|
|
13264
|
+
"zh-CN": zh$7,
|
|
13265
|
+
en: en$7,
|
|
13266
|
+
"en-US": en$7
|
|
12642
13267
|
};
|
|
12643
13268
|
/** 一个额度窗口的键到「窗口长度(分钟)」的映射。窗口名由共享组件按长度本地化。 */
|
|
12644
13269
|
const QUOTA_WINDOW_MINUTES = {
|
|
@@ -12756,7 +13381,7 @@ window.__ModuleLoader__.load({
|
|
|
12756
13381
|
/** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
|
|
12757
13382
|
const LOGIN_POLL_INTERVAL_MS$1 = 2e3;
|
|
12758
13383
|
/** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
|
|
12759
|
-
const fallbackTranslate$5 = (key) => zh$
|
|
13384
|
+
const fallbackTranslate$5 = (key) => zh$7[key];
|
|
12760
13385
|
/**
|
|
12761
13386
|
* 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
|
|
12762
13387
|
*
|
|
@@ -13442,7 +14067,7 @@ window.__ModuleLoader__.load({
|
|
|
13442
14067
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, profile, pasteOpen, contextDrafts, savingModel, quotaAccount, quotaPassword, quotaToken } = state;
|
|
13443
14068
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels, cache, cacheHitRatio: hitRatio, quotaCredential } = derived;
|
|
13444
14069
|
const { setProfile, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setDefaultReasoningEffort, setCacheRequestParams, refreshQuota, refreshCatalog, testConnection, setQuotaAccount, setQuotaPassword, setQuotaToken, submitQuotaPassword, submitQuotaToken, clearQuotaCredential } = actions;
|
|
13445
|
-
const t = useLineDict(NS_STEP_CODE, zh$
|
|
14070
|
+
const t = useLineDict(NS_STEP_CODE, zh$7);
|
|
13446
14071
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
13447
14072
|
className: "dsha-page",
|
|
13448
14073
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -14159,6 +14784,7 @@ window.__ModuleLoader__.load({
|
|
|
14159
14784
|
})
|
|
14160
14785
|
]
|
|
14161
14786
|
}),
|
|
14787
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "step-code" }),
|
|
14162
14788
|
error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
14163
14789
|
className: "dsha-error",
|
|
14164
14790
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: error })
|
|
@@ -14345,7 +14971,7 @@ window.__ModuleLoader__.load({
|
|
|
14345
14971
|
//#endregion
|
|
14346
14972
|
//#region src/client/cline-pass/locales.ts
|
|
14347
14973
|
const NS_CLINE_PASS = "dsh-cline-pass";
|
|
14348
|
-
const zh$
|
|
14974
|
+
const zh$6 = {
|
|
14349
14975
|
...accountPoolZh,
|
|
14350
14976
|
relogin: "重新登录",
|
|
14351
14977
|
needsRelogin: "登录已失效",
|
|
@@ -14469,7 +15095,7 @@ window.__ModuleLoader__.load({
|
|
|
14469
15095
|
limitRoute: "模型路由按 provider id 抢占:若已有其他插件占用 cline-pass,本卡仍可配置,但请求由对方服务。",
|
|
14470
15096
|
limitQuota: "额度窗口来自网关的 usage-limits 接口;接口失败时卡片保留上一次读数并显示原因。"
|
|
14471
15097
|
};
|
|
14472
|
-
const en$
|
|
15098
|
+
const en$6 = {
|
|
14473
15099
|
...accountPoolEn,
|
|
14474
15100
|
relogin: "Sign in again",
|
|
14475
15101
|
needsRelogin: "Sign-in expired",
|
|
@@ -14593,11 +15219,11 @@ window.__ModuleLoader__.load({
|
|
|
14593
15219
|
limitRoute: "The route is claimed by provider id: if another plugin already serves cline-pass, this card still configures the line but that provider answers the requests.",
|
|
14594
15220
|
limitQuota: "Quota windows come from the gateway usage-limits endpoint; when it fails the card keeps the previous reading and says why."
|
|
14595
15221
|
};
|
|
14596
|
-
const dictionaries$
|
|
14597
|
-
zh: zh$
|
|
14598
|
-
"zh-CN": zh$
|
|
14599
|
-
en: en$
|
|
14600
|
-
"en-US": en$
|
|
15222
|
+
const dictionaries$6 = {
|
|
15223
|
+
zh: zh$6,
|
|
15224
|
+
"zh-CN": zh$6,
|
|
15225
|
+
en: en$6,
|
|
15226
|
+
"en-US": en$6
|
|
14601
15227
|
};
|
|
14602
15228
|
//#endregion
|
|
14603
15229
|
//#region src/client/cline-pass/ClinePassSection.tsx
|
|
@@ -14716,10 +15342,10 @@ window.__ModuleLoader__.load({
|
|
|
14716
15342
|
API$5.loginStatus(flow.id).then((next) => {
|
|
14717
15343
|
setLoginFlow(next);
|
|
14718
15344
|
if (next.status === "complete") {
|
|
14719
|
-
setNotice(zh$
|
|
15345
|
+
setNotice(zh$6.loginComplete.replace("{account}", next.accountAlias === "" ? "Cline Pass" : next.accountAlias));
|
|
14720
15346
|
setShowKeyForm(false);
|
|
14721
15347
|
loadStatus();
|
|
14722
|
-
} else if (next.status === "failed") setError(zh$
|
|
15348
|
+
} else if (next.status === "failed") setError(zh$6.loginFailed.replace("{detail}", next.error));
|
|
14723
15349
|
}).catch((cause) => setError(detail$1(cause)));
|
|
14724
15350
|
}, Math.max(2, flow.intervalSeconds) * 1e3);
|
|
14725
15351
|
return () => window.clearInterval(timer);
|
|
@@ -14793,7 +15419,7 @@ window.__ModuleLoader__.load({
|
|
|
14793
15419
|
apiKey: trimmed,
|
|
14794
15420
|
...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
|
|
14795
15421
|
}).then((result) => {
|
|
14796
|
-
setNotice(result.authorized ? zh$
|
|
15422
|
+
setNotice(result.authorized ? zh$6.keyTestOk.replace("{ms}", String(Math.round(result.ms))) : zh$6.keyTestFailed.replace("{detail}", result.error));
|
|
14797
15423
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
14798
15424
|
}, [key, keyBaseURL]);
|
|
14799
15425
|
const testStored = (0, react.useCallback)((accountId) => {
|
|
@@ -14801,7 +15427,7 @@ window.__ModuleLoader__.load({
|
|
|
14801
15427
|
setError(null);
|
|
14802
15428
|
setNotice(null);
|
|
14803
15429
|
API$5.testKey({ accountId }).then((result) => {
|
|
14804
|
-
setNotice(result.authorized ? zh$
|
|
15430
|
+
setNotice(result.authorized ? zh$6.keyTestOk.replace("{ms}", String(Math.round(result.ms))) : zh$6.keyTestFailed.replace("{detail}", result.error));
|
|
14805
15431
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
14806
15432
|
}, []);
|
|
14807
15433
|
const enabledModels = (0, react.useMemo)(() => (status?.models ?? []).filter((model) => model.enabled), [status]);
|
|
@@ -14827,7 +15453,7 @@ window.__ModuleLoader__.load({
|
|
|
14827
15453
|
if (model === void 0) return;
|
|
14828
15454
|
const parsed = parsePositiveCapacity$1(drafts[id] ?? formatCapacity$1(model.contextWindow));
|
|
14829
15455
|
if (parsed === null) {
|
|
14830
|
-
setError(zh$
|
|
15456
|
+
setError(zh$6.error.replace("{detail}", zh$6.defaultContextWindow));
|
|
14831
15457
|
return;
|
|
14832
15458
|
}
|
|
14833
15459
|
run("ctx:" + id, () => API$5.setContextWindow(id, parsed));
|
|
@@ -14849,7 +15475,7 @@ window.__ModuleLoader__.load({
|
|
|
14849
15475
|
}, [run, status]);
|
|
14850
15476
|
const resetAllContext = (0, react.useCallback)(() => {
|
|
14851
15477
|
if (status === null) return;
|
|
14852
|
-
if (typeof window !== "undefined" && !window.confirm(zh$
|
|
15478
|
+
if (typeof window !== "undefined" && !window.confirm(zh$6.contextResetAll)) return;
|
|
14853
15479
|
const overridden = status.models.filter((model) => model.contextWindowOverride !== void 0);
|
|
14854
15480
|
run("ctx-all", async () => {
|
|
14855
15481
|
let next = status;
|
|
@@ -14890,7 +15516,7 @@ window.__ModuleLoader__.load({
|
|
|
14890
15516
|
const refreshUsage = (0, react.useCallback)(() => {
|
|
14891
15517
|
run("usage", async () => {
|
|
14892
15518
|
const outcome = await API$5.readUsage();
|
|
14893
|
-
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$
|
|
15519
|
+
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$6.usageEmpty);
|
|
14894
15520
|
return outcome.status;
|
|
14895
15521
|
});
|
|
14896
15522
|
}, [run]);
|
|
@@ -14910,7 +15536,7 @@ window.__ModuleLoader__.load({
|
|
|
14910
15536
|
};
|
|
14911
15537
|
const invalid = Object.entries(numbers).find(([, value]) => !Number.isSafeInteger(value) || value < 0);
|
|
14912
15538
|
if (invalid !== void 0) {
|
|
14913
|
-
setError(zh$
|
|
15539
|
+
setError(zh$6.error.replace("{detail}", invalid[0]));
|
|
14914
15540
|
return;
|
|
14915
15541
|
}
|
|
14916
15542
|
setBusy("settings");
|
|
@@ -14921,7 +15547,7 @@ window.__ModuleLoader__.load({
|
|
|
14921
15547
|
}).then((next) => {
|
|
14922
15548
|
applyStatus(next);
|
|
14923
15549
|
setSettingsForm(settingsFormOf$1(next));
|
|
14924
|
-
setNotice(zh$
|
|
15550
|
+
setNotice(zh$6.saved);
|
|
14925
15551
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
14926
15552
|
}, [settingsForm, applyStatus]);
|
|
14927
15553
|
const toggleTools = (0, react.useCallback)(() => {
|
|
@@ -14932,10 +15558,10 @@ window.__ModuleLoader__.load({
|
|
|
14932
15558
|
API$5.updateSettings({ exposeTools: value }).then((next) => {
|
|
14933
15559
|
applyStatus(next);
|
|
14934
15560
|
setSettingsForm(settingsFormOf$1(next));
|
|
14935
|
-
setNotice(zh$
|
|
15561
|
+
setNotice(zh$6.restartRequired);
|
|
14936
15562
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
14937
15563
|
}, [status, applyStatus]);
|
|
14938
|
-
const t = useLineDict(NS_CLINE_PASS, zh$
|
|
15564
|
+
const t = useLineDict(NS_CLINE_PASS, zh$6);
|
|
14939
15565
|
const errorPrefix = t.error.split("{detail}")[0] ?? "";
|
|
14940
15566
|
const pool = status?.pool;
|
|
14941
15567
|
const accounts = (0, react.useMemo)(() => {
|
|
@@ -15655,6 +16281,7 @@ window.__ModuleLoader__.load({
|
|
|
15655
16281
|
children: warning
|
|
15656
16282
|
}, warning))
|
|
15657
16283
|
] }),
|
|
16284
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "cline-pass" }),
|
|
15658
16285
|
result.error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15659
16286
|
className: "dshcp-warning",
|
|
15660
16287
|
children: result.error
|
|
@@ -15709,7 +16336,7 @@ window.__ModuleLoader__.load({
|
|
|
15709
16336
|
* 'settings.section' 上的那张座位(那张座绑定的是 ChatGPT 的键集)。
|
|
15710
16337
|
*/
|
|
15711
16338
|
const NS_QODER = "dsh-qoder";
|
|
15712
|
-
const zh$
|
|
16339
|
+
const zh$5 = {
|
|
15713
16340
|
modelRowEfforts: "档位 {list}",
|
|
15714
16341
|
modelRowNoEfforts: "无档位",
|
|
15715
16342
|
modelRowOutput: "输出 {cap}",
|
|
@@ -15833,8 +16460,8 @@ window.__ModuleLoader__.load({
|
|
|
15833
16460
|
quotaWindow: "额度窗口"
|
|
15834
16461
|
};
|
|
15835
16462
|
/** 两套字典。 */
|
|
15836
|
-
const dictionaries$
|
|
15837
|
-
zh: zh$
|
|
16463
|
+
const dictionaries$5 = {
|
|
16464
|
+
zh: zh$5,
|
|
15838
16465
|
en: {
|
|
15839
16466
|
modelRowEfforts: "efforts {list}",
|
|
15840
16467
|
modelRowNoEfforts: "no efforts",
|
|
@@ -16035,7 +16662,7 @@ window.__ModuleLoader__.load({
|
|
|
16035
16662
|
/** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
|
|
16036
16663
|
const LOGIN_POLL_INTERVAL_MS = 2e3;
|
|
16037
16664
|
/** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
|
|
16038
|
-
const fallbackTranslate$4 = (key) => zh$
|
|
16665
|
+
const fallbackTranslate$4 = (key) => zh$5[key];
|
|
16039
16666
|
/**
|
|
16040
16667
|
* 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
|
|
16041
16668
|
*
|
|
@@ -16601,7 +17228,7 @@ window.__ModuleLoader__.load({
|
|
|
16601
17228
|
* `defaultMaxTokens`),客户端不按模型名推断任何一项。与 OpenDesign 卡同一写法:
|
|
16602
17229
|
* 数据一行,散文进折叠区。
|
|
16603
17230
|
*/
|
|
16604
|
-
function qoderModelRowHint(model, t = zh$
|
|
17231
|
+
function qoderModelRowHint(model, t = zh$5) {
|
|
16605
17232
|
return `${formatTokenCount(model.contextWindow)} · ${model.supportsImages ? "text+image" : "text"} · ${model.reasoningEfforts.length === 0 ? t.modelRowNoEfforts : t.modelRowEfforts.replace("{list}", model.reasoningEfforts.join("/"))} · ${t.modelRowOutput.replace("{cap}", formatTokenCount(model.defaultMaxTokens))}`;
|
|
16606
17233
|
}
|
|
16607
17234
|
function QoderSection({ onModelChange } = {}) {
|
|
@@ -16609,7 +17236,7 @@ window.__ModuleLoader__.load({
|
|
|
16609
17236
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
|
|
16610
17237
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels, cache, cacheHitRatio: hitRatio } = derived;
|
|
16611
17238
|
const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setDefaultReasoningEffort, refreshQuota, refreshCatalog, testConnection } = actions;
|
|
16612
|
-
const t = useLineDict(NS_QODER, zh$
|
|
17239
|
+
const t = useLineDict(NS_QODER, zh$5);
|
|
16613
17240
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
16614
17241
|
className: "dsha-page",
|
|
16615
17242
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -17124,6 +17751,7 @@ window.__ModuleLoader__.load({
|
|
|
17124
17751
|
moreNotes(t.moreNotes, [t.quotaDesc])
|
|
17125
17752
|
]
|
|
17126
17753
|
}),
|
|
17754
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "qoder" }),
|
|
17127
17755
|
error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
17128
17756
|
className: "dsha-error",
|
|
17129
17757
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: error })
|
|
@@ -17204,7 +17832,7 @@ window.__ModuleLoader__.load({
|
|
|
17204
17832
|
//#endregion
|
|
17205
17833
|
//#region src/client/opendesign/locales.ts
|
|
17206
17834
|
const NS_OPENDESIGN = "dsh-opendesign";
|
|
17207
|
-
const zh$
|
|
17835
|
+
const zh$4 = {
|
|
17208
17836
|
...accountPoolZh,
|
|
17209
17837
|
relogin: "重新登录",
|
|
17210
17838
|
needsRelogin: "登录已失效",
|
|
@@ -17312,7 +17940,7 @@ window.__ModuleLoader__.load({
|
|
|
17312
17940
|
limitRoute: "模型路由按 provider id 抢占:若已有其他插件占用 opendesign,本卡仍可配置,但请求由对方服务。",
|
|
17313
17941
|
limitQuota: "套餐与额度读取只覆盖浏览器授权登录的账号;粘贴的 API Key 没有控制 Key,请在 OpenDesign Cloud 控制台查看用量。"
|
|
17314
17942
|
};
|
|
17315
|
-
const en$
|
|
17943
|
+
const en$4 = {
|
|
17316
17944
|
...accountPoolEn,
|
|
17317
17945
|
relogin: "Add again",
|
|
17318
17946
|
needsRelogin: "Key invalid",
|
|
@@ -17420,11 +18048,11 @@ window.__ModuleLoader__.load({
|
|
|
17420
18048
|
limitRoute: "The route is claimed by provider id: if another plugin already serves opendesign, this card still configures the line but that provider answers the requests.",
|
|
17421
18049
|
limitQuota: "Plan and credit reads cover browser-signed-in accounts only; a pasted API key has no control key, so see usage in the OpenDesign Cloud console."
|
|
17422
18050
|
};
|
|
17423
|
-
const dictionaries$
|
|
17424
|
-
zh: zh$
|
|
17425
|
-
"zh-CN": zh$
|
|
17426
|
-
en: en$
|
|
17427
|
-
"en-US": en$
|
|
18051
|
+
const dictionaries$4 = {
|
|
18052
|
+
zh: zh$4,
|
|
18053
|
+
"zh-CN": zh$4,
|
|
18054
|
+
en: en$4,
|
|
18055
|
+
"en-US": en$4
|
|
17428
18056
|
};
|
|
17429
18057
|
//#endregion
|
|
17430
18058
|
//#region src/client/opendesign/OpenDesignSection.tsx
|
|
@@ -17719,7 +18347,7 @@ window.__ModuleLoader__.load({
|
|
|
17719
18347
|
try {
|
|
17720
18348
|
const outcome = await API$4.readUsage();
|
|
17721
18349
|
setStatus(outcome.status);
|
|
17722
|
-
if (!silent) setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$
|
|
18350
|
+
if (!silent) setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$4.usageEmpty);
|
|
17723
18351
|
} catch (cause) {
|
|
17724
18352
|
if (!silent) setError(detail(cause));
|
|
17725
18353
|
}
|
|
@@ -17756,10 +18384,10 @@ window.__ModuleLoader__.load({
|
|
|
17756
18384
|
API$4.loginStatus(flow.id).then((next) => {
|
|
17757
18385
|
setLoginFlow(next);
|
|
17758
18386
|
if (next.status === "complete") {
|
|
17759
|
-
setNotice(zh$
|
|
18387
|
+
setNotice(zh$4.loginComplete.replace("{account}", next.accountAlias === "" ? "OpenDesign" : next.accountAlias));
|
|
17760
18388
|
setShowKeyForm(false);
|
|
17761
18389
|
reload();
|
|
17762
|
-
} else if (next.status === "failed") setError(zh$
|
|
18390
|
+
} else if (next.status === "failed") setError(zh$4.loginFailed.replace("{detail}", next.error));
|
|
17763
18391
|
}).catch((cause) => setError(detail(cause)));
|
|
17764
18392
|
}, Math.max(2, flow.intervalSeconds) * 1e3);
|
|
17765
18393
|
return () => window.clearInterval(timer);
|
|
@@ -17825,7 +18453,7 @@ window.__ModuleLoader__.load({
|
|
|
17825
18453
|
const refreshUsage = (0, react.useCallback)(() => {
|
|
17826
18454
|
run("usage", async () => {
|
|
17827
18455
|
const outcome = await API$4.readUsage();
|
|
17828
|
-
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$
|
|
18456
|
+
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$4.usageEmpty);
|
|
17829
18457
|
return outcome.status;
|
|
17830
18458
|
});
|
|
17831
18459
|
}, [run]);
|
|
@@ -17860,7 +18488,7 @@ window.__ModuleLoader__.load({
|
|
|
17860
18488
|
apiKey: trimmed,
|
|
17861
18489
|
...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
|
|
17862
18490
|
}).then((result) => {
|
|
17863
|
-
setNotice(result.authorized ? zh$
|
|
18491
|
+
setNotice(result.authorized ? zh$4.keyTestOk.replace("{ms}", String(Math.round(result.ms))).replace("{count}", String(result.modelCount)) : zh$4.keyTestFailed.replace("{detail}", result.error));
|
|
17864
18492
|
}).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
|
|
17865
18493
|
}, [key, keyBaseURL]);
|
|
17866
18494
|
const testStored = (0, react.useCallback)((accountId) => {
|
|
@@ -17868,7 +18496,7 @@ window.__ModuleLoader__.load({
|
|
|
17868
18496
|
setError(null);
|
|
17869
18497
|
setNotice(null);
|
|
17870
18498
|
API$4.testKey({ accountId }).then((result) => {
|
|
17871
|
-
setNotice(result.authorized ? zh$
|
|
18499
|
+
setNotice(result.authorized ? zh$4.keyTestOk.replace("{ms}", String(Math.round(result.ms))).replace("{count}", String(result.modelCount)) : zh$4.keyTestFailed.replace("{detail}", result.error));
|
|
17872
18500
|
}).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
|
|
17873
18501
|
}, []);
|
|
17874
18502
|
const enabledModels = (0, react.useMemo)(() => (status?.models ?? []).filter((model) => model.enabled), [status]);
|
|
@@ -17894,7 +18522,7 @@ window.__ModuleLoader__.load({
|
|
|
17894
18522
|
if (model === void 0) return;
|
|
17895
18523
|
const parsed = parsePositiveCapacity$1(drafts[id] ?? formatCapacity$1(model.contextWindow));
|
|
17896
18524
|
if (parsed === null) {
|
|
17897
|
-
setError(zh$
|
|
18525
|
+
setError(zh$4.error.replace("{detail}", zh$4.defaultContextWindow));
|
|
17898
18526
|
return;
|
|
17899
18527
|
}
|
|
17900
18528
|
run("ctx:" + id, () => API$4.setContextWindow(id, parsed));
|
|
@@ -17916,7 +18544,7 @@ window.__ModuleLoader__.load({
|
|
|
17916
18544
|
}, [run, status]);
|
|
17917
18545
|
const resetAllContext = (0, react.useCallback)(() => {
|
|
17918
18546
|
if (status === null) return;
|
|
17919
|
-
if (typeof window !== "undefined" && !window.confirm(zh$
|
|
18547
|
+
if (typeof window !== "undefined" && !window.confirm(zh$4.contextResetAll)) return;
|
|
17920
18548
|
const overridden = status.models.filter((model) => model.contextWindowOverride !== void 0);
|
|
17921
18549
|
run("ctx-all", async () => {
|
|
17922
18550
|
let next = status;
|
|
@@ -17932,7 +18560,7 @@ window.__ModuleLoader__.load({
|
|
|
17932
18560
|
const refreshCatalog = (0, react.useCallback)(() => {
|
|
17933
18561
|
run("catalog", async () => {
|
|
17934
18562
|
const outcome = await API$4.refreshCatalog();
|
|
17935
|
-
setNotice(zh$
|
|
18563
|
+
setNotice(zh$4.catalogSyncedNote.replace("{count}", String(outcome.status.catalogCount)));
|
|
17936
18564
|
return outcome.status;
|
|
17937
18565
|
});
|
|
17938
18566
|
}, [run]);
|
|
@@ -17946,7 +18574,7 @@ window.__ModuleLoader__.load({
|
|
|
17946
18574
|
};
|
|
17947
18575
|
const invalid = Object.entries(numbers).find(([, value]) => !Number.isSafeInteger(value) || value < 0);
|
|
17948
18576
|
if (invalid !== void 0) {
|
|
17949
|
-
setError(zh$
|
|
18577
|
+
setError(zh$4.error.replace("{detail}", invalid[0]));
|
|
17950
18578
|
return;
|
|
17951
18579
|
}
|
|
17952
18580
|
setBusy("settings");
|
|
@@ -17957,10 +18585,10 @@ window.__ModuleLoader__.load({
|
|
|
17957
18585
|
}).then((next) => {
|
|
17958
18586
|
applyStatus(next);
|
|
17959
18587
|
setSettingsForm(settingsFormOf(next));
|
|
17960
|
-
setNotice(zh$
|
|
18588
|
+
setNotice(zh$4.saved);
|
|
17961
18589
|
}).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
|
|
17962
18590
|
}, [settingsForm, applyStatus]);
|
|
17963
|
-
const t = useLineDict(NS_OPENDESIGN, zh$
|
|
18591
|
+
const t = useLineDict(NS_OPENDESIGN, zh$4);
|
|
17964
18592
|
const errorPrefix = t.error.split("{detail}")[0] ?? "";
|
|
17965
18593
|
const pool = status?.pool;
|
|
17966
18594
|
const accounts = pool?.accounts ?? [];
|
|
@@ -18430,7 +19058,8 @@ window.__ModuleLoader__.load({
|
|
|
18430
19058
|
onClick: saveSettings,
|
|
18431
19059
|
children: busy === "settings" ? t.savingSettings : t.saveSettings
|
|
18432
19060
|
})
|
|
18433
|
-
})
|
|
19061
|
+
}),
|
|
19062
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "opendesign" })
|
|
18434
19063
|
]
|
|
18435
19064
|
})
|
|
18436
19065
|
]
|
|
@@ -18477,7 +19106,7 @@ window.__ModuleLoader__.load({
|
|
|
18477
19106
|
* control that renders it instead.
|
|
18478
19107
|
*/
|
|
18479
19108
|
const NS_WORKBUDDY = "dsh-workbuddy";
|
|
18480
|
-
const zh$
|
|
19109
|
+
const zh$3 = {
|
|
18481
19110
|
title: "WorkBuddy",
|
|
18482
19111
|
pageDesc: "复用本机 CodeBuddy 桌面端登录态,管理 WorkBuddy(CodeBuddy 订阅)模型、上下文窗口与额度。",
|
|
18483
19112
|
account: "账号",
|
|
@@ -18603,7 +19232,7 @@ window.__ModuleLoader__.load({
|
|
|
18603
19232
|
modelCooldownActive: "模型限流中",
|
|
18604
19233
|
notRoutable: "当前不可路由"
|
|
18605
19234
|
};
|
|
18606
|
-
const en$
|
|
19235
|
+
const en$3 = {
|
|
18607
19236
|
title: "WorkBuddy",
|
|
18608
19237
|
pageDesc: "Reuse the local CodeBuddy desktop sign-in to manage WorkBuddy (CodeBuddy subscription) models, context windows, and quota.",
|
|
18609
19238
|
account: "Account",
|
|
@@ -18729,11 +19358,11 @@ window.__ModuleLoader__.load({
|
|
|
18729
19358
|
modelCooldownActive: "Model parked",
|
|
18730
19359
|
notRoutable: "Not routable right now"
|
|
18731
19360
|
};
|
|
18732
|
-
const dictionaries$
|
|
18733
|
-
zh: zh$
|
|
18734
|
-
"zh-CN": zh$
|
|
18735
|
-
en: en$
|
|
18736
|
-
"en-US": en$
|
|
19361
|
+
const dictionaries$3 = {
|
|
19362
|
+
zh: zh$3,
|
|
19363
|
+
"zh-CN": zh$3,
|
|
19364
|
+
en: en$3,
|
|
19365
|
+
"en-US": en$3
|
|
18737
19366
|
};
|
|
18738
19367
|
//#endregion
|
|
18739
19368
|
//#region src/client/workbuddy/useWorkBuddySection.ts
|
|
@@ -18831,7 +19460,7 @@ window.__ModuleLoader__.load({
|
|
|
18831
19460
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
18832
19461
|
const [contextDrafts, setContextDrafts] = (0, react.useState)({});
|
|
18833
19462
|
const [savingModel, setSavingModel] = (0, react.useState)(null);
|
|
18834
|
-
const t = useLineDict(NS_WORKBUDDY, zh$
|
|
19463
|
+
const t = useLineDict(NS_WORKBUDDY, zh$3);
|
|
18835
19464
|
const notifyChange = (0, react.useCallback)(() => {
|
|
18836
19465
|
onModelChange?.();
|
|
18837
19466
|
loadModelDirectory?.();
|
|
@@ -19465,7 +20094,7 @@ window.__ModuleLoader__.load({
|
|
|
19465
20094
|
const timer = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
19466
20095
|
return () => window.clearInterval(timer);
|
|
19467
20096
|
}, [pausedUntil]);
|
|
19468
|
-
const t = useLineDict(NS_WORKBUDDY, zh$
|
|
20097
|
+
const t = useLineDict(NS_WORKBUDDY, zh$3);
|
|
19469
20098
|
const poolState = poolStateLines(pool, t, now);
|
|
19470
20099
|
const storageLine = poolStorageLine(pool?.storage, t);
|
|
19471
20100
|
const storageUnavailable = pool?.storage === void 0 ? null : poolStorageUnavailableLabel(pool.storage, t);
|
|
@@ -20052,6 +20681,7 @@ window.__ModuleLoader__.load({
|
|
|
20052
20681
|
})
|
|
20053
20682
|
]
|
|
20054
20683
|
}),
|
|
20684
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "workbuddy-subscription" }),
|
|
20055
20685
|
error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
20056
20686
|
className: "dsha-error",
|
|
20057
20687
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: error })
|
|
@@ -20697,454 +21327,6 @@ window.__ModuleLoader__.load({
|
|
|
20697
21327
|
});
|
|
20698
21328
|
}
|
|
20699
21329
|
//#endregion
|
|
20700
|
-
//#region src/client/locales.ts
|
|
20701
|
-
const NS = "dsh-chatgpt-subscription";
|
|
20702
|
-
const zh$3 = {
|
|
20703
|
-
...accountPoolZh,
|
|
20704
|
-
title: "ChatGPT",
|
|
20705
|
-
hubTitle: "订阅服务",
|
|
20706
|
-
intro: "使用 ChatGPT 账号登录,在 DSH 中使用订阅可用的模型。",
|
|
20707
|
-
account: "账号",
|
|
20708
|
-
signedOut: "尚未登录",
|
|
20709
|
-
signedIn: "已登录",
|
|
20710
|
-
plan: "套餐",
|
|
20711
|
-
accountId: "账号 ID",
|
|
20712
|
-
expires: "令牌到期",
|
|
20713
|
-
signIn: "使用 ChatGPT 登录",
|
|
20714
|
-
signInAgain: "重新登录",
|
|
20715
|
-
cancel: "取消登录",
|
|
20716
|
-
signOut: "注销",
|
|
20717
|
-
refreshToken: "刷新凭据",
|
|
20718
|
-
pending: "请在浏览器中完成登录。",
|
|
20719
|
-
popupBlocked: "浏览器拦截了登录窗口,请使用下面的链接继续。",
|
|
20720
|
-
continueLogin: "打开 ChatGPT 登录页",
|
|
20721
|
-
loading: "正在读取状态…",
|
|
20722
|
-
connection: "连接",
|
|
20723
|
-
testConnection: "测试连接",
|
|
20724
|
-
testing: "测试中…",
|
|
20725
|
-
latency: "最近延迟",
|
|
20726
|
-
selectAll: "全选",
|
|
20727
|
-
unselectAll: "全不选",
|
|
20728
|
-
models: "可用模型",
|
|
20729
|
-
modelsHint: "勾选后模型才会显示在对话页的模型选择列表中;全部取消勾选或关闭上方开关可在列表中隐藏该供应商。",
|
|
20730
|
-
proxySettings: "网络代理",
|
|
20731
|
-
proxyMode: "代理模式",
|
|
20732
|
-
proxyModeHint: "本插件的全部供应线路共用这一份代理设置,登录、令牌续期、模型目录与配额读取同样经过它;支持自动读取系统代理,修改后对后续请求生效。",
|
|
20733
|
-
proxyModeAuto: "系统代理(自动检测)",
|
|
20734
|
-
proxyModeCustom: "自定义代理",
|
|
20735
|
-
proxyModeDirect: "直连(禁用代理)",
|
|
20736
|
-
customProxyUrl: "自定义代理地址",
|
|
20737
|
-
customProxyUrlHint: "支持 HTTP/HTTPS/SOCKS5 代理地址,例如 http://127.0.0.1:7890",
|
|
20738
|
-
customProxyUrlPlaceholder: "例如: http://127.0.0.1:7890",
|
|
20739
|
-
saveProxyUrl: "保存代理地址",
|
|
20740
|
-
proxyDetected: "检测到系统代理",
|
|
20741
|
-
proxyDetectedEffective: "(已自动生效)",
|
|
20742
|
-
proxyNoneDetected: "未检测到系统代理,将使用直连",
|
|
20743
|
-
proxyDirectHint: "本插件的全部请求将直接连接,不经过任何代理服务器。",
|
|
20744
|
-
poolStorageTitle: "账号存储位置",
|
|
20745
|
-
poolStorageKeyring: "桌面密钥环",
|
|
20746
|
-
poolStorageCredentials: "DSH 凭据库",
|
|
20747
|
-
poolStorageKeyringHint: "仅限桌面安装:使用操作系统密钥环(DPAPI / 钥匙串 / Secret Service)。在服务器或无桌面的 Linux 主机上密钥环通常不可用,登录会失败——请改选 DSH 凭据库。",
|
|
20748
|
-
poolStorageCredentialsHint: "DSH 的标准密钥存储($DSH_HOME/.credentials.yaml)。POSIX 上强制 0600、创建者独占;Windows 上只有 profile ACL,没有权限位可强制。服务器以及任何没有桌面密钥环的主机都用它。静态不加密,靠宿主权限保护。",
|
|
20749
|
-
poolStorageEffective: "当前实际使用:{storage}",
|
|
20750
|
-
poolStorageBackendKeyring: "桌面密钥环(Secret Service),静态加密",
|
|
20751
|
-
poolStorageBackendDpapi: "Windows DPAPI,静态加密",
|
|
20752
|
-
poolStorageBackendKeychain: "macOS 钥匙串,静态加密",
|
|
20753
|
-
poolStorageBackendCredentials: "DSH 凭据库(.credentials.yaml),由文件权限保护",
|
|
20754
|
-
poolStorageSwitchWarning: "已保存在另一个存储里的账号会留在原处,切回去之前不会显示。不会做迁移。",
|
|
20755
|
-
poolStorageUnavailableKeyring: "这台主机上没有可用的桌面密钥环,因此号池无法读写。请把「账号存储位置」改成 DSH 凭据库。",
|
|
20756
|
-
poolStorageUnavailableCredentials: "这个 harness 没有凭据库(ctx.credentials),因此号池无法读写。请把「账号存储位置」改成桌面密钥环。",
|
|
20757
|
-
poolStorageUnavailableStore: "号池存储这次没有应答,所以这里没有列出账号——账号并没有被删除,存储恢复后重新打开本页即可。",
|
|
20758
|
-
enhancements: "增强功能",
|
|
20759
|
-
fastMode: "快速模式(1.5x 速度)",
|
|
20760
|
-
fastModeHint: "提升 Token 生成速度至约 1.5 倍;将以约 2x–2.5x 速度消耗 Codex 订阅额度。",
|
|
20761
|
-
outputVerbosity: "输出详细程度",
|
|
20762
|
-
outputVerbosityHint: "控制 Codex 最终回答的详细程度;不影响思考深度。默认值与官方 Codex 客户端一致(低)。",
|
|
20763
|
-
verbosityLow: "低(保持回答简洁)",
|
|
20764
|
-
verbosityMedium: "中(兼顾细节与简洁)",
|
|
20765
|
-
verbosityHigh: "高(在回答中包含更多细节)",
|
|
20766
|
-
reasoningSummary: "推理摘要",
|
|
20767
|
-
reasoningSummaryHint: "选择 ChatGPT 总结其推理的方式;不影响思考深度。默认值与官方 Codex 客户端一致(不生成摘要,可省额度)。",
|
|
20768
|
-
summaryAuto: "自动(让模型选择摘要详细程度)",
|
|
20769
|
-
summaryConcise: "简洁(显示简要推理摘要)",
|
|
20770
|
-
summaryDetailed: "详细(显示更详细的推理摘要)",
|
|
20771
|
-
summaryNone: "无(不显示推理摘要)",
|
|
20772
|
-
searchProvider: "搜索来源",
|
|
20773
|
-
searchProviderHint: "选择 DSH 联网搜索使用默认来源,或改用当前 ChatGPT 订阅的 Codex 来源(自动走代理隧道)。抓取模式为 auto 时,抓取来源跟随此选择。",
|
|
20774
|
-
searchProviderDsh: "DSH 默认",
|
|
20775
|
-
searchProviderCodex: "ChatGPT(代理隧道)",
|
|
20776
|
-
fetchStatus: "抓取来源(只读)",
|
|
20777
|
-
fetchStatusHint: "以下内容由 Host 上报,只读展示。",
|
|
20778
|
-
fetchConfiguredProvider: "配置的抓取 Provider",
|
|
20779
|
-
fetchProviderDshDefault: "DSH 默认(Host 未固定抓取 provider)",
|
|
20780
|
-
switcherState: "抓取选择器状态",
|
|
20781
|
-
switcherStateIdle: "空闲(尚未应用选择)",
|
|
20782
|
-
switcherStateApplying: "应用中(正在切换 Host 的 web provider)",
|
|
20783
|
-
switcherStateApplied: "已应用",
|
|
20784
|
-
switcherStateMissing: "未找到可切换的 web 服务",
|
|
20785
|
-
switcherStateFailed: "切换失败,请检查 Host 日志",
|
|
20786
|
-
fetchMode: "抓取模式",
|
|
20787
|
-
fetchModeAuto: "auto(有可用代理或选了 ChatGPT 搜索时用插件抓取)",
|
|
20788
|
-
fetchModePlugin: "plugin(始终用本插件抓取)",
|
|
20789
|
-
fetchModeDsh: "dsh(保留 DSH 原有抓取来源)",
|
|
20790
|
-
fetchMaxBodyChars: "插件正文上限",
|
|
20791
|
-
fetchMaxResponseBytes: "插件响应体上限",
|
|
20792
|
-
characters: "字符",
|
|
20793
|
-
bytes: "字节",
|
|
20794
|
-
fetchLimitsInactive: "仅在实际使用插件抓取时生效;走 DSH 原有抓取来源时不适用这两个上限。",
|
|
20795
|
-
fetchConfigSource: "模式与上限在插件 Config 中修改(不是本页面偏好),修改后重载插件或重启 DSH 生效。",
|
|
20796
|
-
providerDefault: "使用 Provider 默认值",
|
|
20797
|
-
contextWindows: "模型上下文窗口",
|
|
20798
|
-
contextWindowsHint: "只列出已勾选「可用模型」的条目。默认取模型目录值(GPT-6 系列 384K,最高 872K;其余最高 1M),该值用于 DSH 的压缩与溢出判断,可输入 872K、512K 等容量;改过的模型可单独或一键恢复默认。",
|
|
20799
|
-
contextWindow: "上下文窗口",
|
|
20800
|
-
contextWindowInvalid: "上下文窗口必须是正整数,且不能超过模型上限(GPT-6 系列为 872K,其余为 1M);可使用 K 或 M 后缀。",
|
|
20801
|
-
contextWindowReset: "恢复默认",
|
|
20802
|
-
contextWindowResetAll: "全部恢复默认",
|
|
20803
|
-
contextWindowResetAllConfirm: "确定把已改过的模型上下文窗口全部恢复为默认值吗?",
|
|
20804
|
-
contextWindowsNoneEnabled: "还没有勾选任何模型。在上方「可用模型」里勾选后,这里会出现该模型的上下文窗口设置。",
|
|
20805
|
-
saveContextWindow: "保存上下文窗口",
|
|
20806
|
-
save: "保存",
|
|
20807
|
-
tokens: "tokens",
|
|
20808
|
-
quickQuota: "在输入框旁显示快捷用量",
|
|
20809
|
-
quickQuotaHint: "仅在当前会话选中 codex-chatgpt 模型时显示。",
|
|
20810
|
-
quota: "用量与限额",
|
|
20811
|
-
quotaIntro: "数据来自 ChatGPT Codex 用量服务。页面可见时最多每 60 秒刷新一次。",
|
|
20812
|
-
refreshQuota: "刷新用量",
|
|
20813
|
-
refreshing: "刷新中…",
|
|
20814
|
-
noQuota: "当前套餐未返回可显示的限额窗口。",
|
|
20815
|
-
quotaSignedOut: "登录后可查看订阅限额。",
|
|
20816
|
-
stale: "显示的是上次成功获取的数据。",
|
|
20817
|
-
updated: "更新时间",
|
|
20818
|
-
primary: "主要窗口",
|
|
20819
|
-
secondary: "次要窗口",
|
|
20820
|
-
limitWindow: "额度",
|
|
20821
|
-
used: "已使用",
|
|
20822
|
-
remaining: "剩余",
|
|
20823
|
-
available: "可用",
|
|
20824
|
-
unavailable: "不可用",
|
|
20825
|
-
unlimited: "无限",
|
|
20826
|
-
credits: "Credits",
|
|
20827
|
-
monthlySpend: "月度消费控制",
|
|
20828
|
-
resetCredits: "重置次数",
|
|
20829
|
-
resetCreditExpires: "到期时间",
|
|
20830
|
-
useResetCredit: "使用重置卡",
|
|
20831
|
-
usingResetCredit: "使用中…",
|
|
20832
|
-
useResetCreditConfirm: "使用后会立即消耗 1 次重置机会,并重置符合条件的 Codex 额度窗口。确定继续吗?",
|
|
20833
|
-
resetCreditUsed: "重置卡已使用,用量数据已刷新。",
|
|
20834
|
-
spendControlReached: "已触发月度消费控制,新的订阅调用可能被限制。",
|
|
20835
|
-
limit: "上限",
|
|
20836
|
-
exhausted: "额度已用尽",
|
|
20837
|
-
resets: "重置",
|
|
20838
|
-
quickQuotaLabel: "Codex 剩余",
|
|
20839
|
-
quickQuotaLoading: "用量…",
|
|
20840
|
-
imageToolRunning: "正在生成图片",
|
|
20841
|
-
imageToolDone: "已生成图片",
|
|
20842
|
-
imageToolFailed: "图片生成失败",
|
|
20843
|
-
image: "图片",
|
|
20844
|
-
openImage: "打开图片",
|
|
20845
|
-
openNamedImage: "打开 {name}",
|
|
20846
|
-
imageLoading: "加载图片…",
|
|
20847
|
-
imageLoadFailed: "图片加载失败,点击重试",
|
|
20848
|
-
imagePreviewClose: "关闭",
|
|
20849
|
-
imagePreviewOpenOriginal: "打开原图",
|
|
20850
|
-
retry: "重试",
|
|
20851
|
-
unknown: "未知",
|
|
20852
|
-
hubBack: "订阅服务",
|
|
20853
|
-
hubOverviewHint: "选择供应商以管理账号、模型与配额;右侧开关控制该供应商是否出现在模型列表中。",
|
|
20854
|
-
hubAccountCount: "{count} 个账号",
|
|
20855
|
-
hubNoAccounts: "暂无账号,点击进入添加",
|
|
20856
|
-
hubStateEnabled: "已启用",
|
|
20857
|
-
hubStateDisabled: "已停用",
|
|
20858
|
-
hubModelsEnabled: "{count} 个模型可用",
|
|
20859
|
-
hubModelsEnabledOfTotal: "{count}/{total} 个模型可用",
|
|
20860
|
-
hubStatusFailed: "状态读取失败",
|
|
20861
|
-
hubSwitchOn: "启用 {name}",
|
|
20862
|
-
hubSwitchOff: "停用 {name}",
|
|
20863
|
-
hubCardLabel: "{name},{annotation}",
|
|
20864
|
-
hubUpdateCheck: "检测更新",
|
|
20865
|
-
hubUpdateChecking: "检测中…",
|
|
20866
|
-
hubUpdateApply: "更新到 v{version}",
|
|
20867
|
-
hubUpdateApplying: "更新中…",
|
|
20868
|
-
hubUpdateUpToDate: "已是最新版本 {version}",
|
|
20869
|
-
hubUpdateLatestWithUnknownCurrent: "最新版本 {version},当前版本未知",
|
|
20870
|
-
hubUpdateAvailable: "有新版本 {version},当前 {current}",
|
|
20871
|
-
hubUpdateInstalled: "已安装 v{version},重启宿主后生效",
|
|
20872
|
-
hubUpdateInstalledReplaced: "已移除旧版并安装 v{version},重启宿主后生效",
|
|
20873
|
-
hubUpdateInstalledLive: "已安装 v{version},当前已生效,无需重启",
|
|
20874
|
-
hubUpdateInstalledReplacedLive: "已移除旧版并安装 v{version},当前已生效,无需重启",
|
|
20875
|
-
hubUpdateFailedRestored: "更新失败,已恢复 v{version}",
|
|
20876
|
-
hubUpdateFailedRollbackFailed: "更新失败,且旧版本也没能重新装回来——插件可能已不可用",
|
|
20877
|
-
hubUpdateFailedRollbackSkipped: "更新失败,且无法自动恢复原版本——插件可能已被移除",
|
|
20878
|
-
hubUpdateDevelopmentInstall: "有新版本 {version};当前是本地链接安装,无法自动更新",
|
|
20879
|
-
hubUpdatePluginManagerMissing: "有新版本 {version};宿主未提供 pluginManager,无法自动更新",
|
|
20880
|
-
hubUpdateManualOnly: "有新版本 {version};当前安装方式无法自动更新",
|
|
20881
|
-
hubUpdateCheckFailed: "检测失败:无法连接 npm 源,请检查网络或代理",
|
|
20882
|
-
hubUpdateCommandLabel: "手动更新命令",
|
|
20883
|
-
localCodexLoginImport: "导入本机登录",
|
|
20884
|
-
localCodexLoginImporting: "导入中…",
|
|
20885
|
-
deviceCodeLogin: "设备代码登录",
|
|
20886
|
-
deviceCodeLoginStarting: "获取代码…",
|
|
20887
|
-
deviceCodeLoginDetail: "用设备代码添加账号",
|
|
20888
|
-
deviceCodeHint: "在任意设备上打开下面的链接并输入这个代码,本页会自动完成登录:这条路不需要浏览器回调到本机端口。",
|
|
20889
|
-
deviceCodeLabel: "设备代码",
|
|
20890
|
-
deviceCodeOpen: "打开确认页面",
|
|
20891
|
-
deviceCodeCopy: "复制到剪贴板",
|
|
20892
|
-
deviceCodeWaiting: "等待确认… 剩余 {time}",
|
|
20893
|
-
stopImporting: "停止导入全部本机登录",
|
|
20894
|
-
stopImportingLabel: "停止导入全部本机登录(当前 {count} 个)",
|
|
20895
|
-
stopImportingBusy: "停止导入中…",
|
|
20896
|
-
stopImportingHint: "停止导入只会让本插件忘记本机 CLI 登录的副本;Codex CLI 自己的登录文件不会被删除或修改。账号池不允许逐条删除借来的凭据,所以这里一次会停止全部导入。",
|
|
20897
|
-
"cardName.chatgpt": "ChatGPT",
|
|
20898
|
-
"cardName.command-code": "Command Code",
|
|
20899
|
-
"cardName.kimi-code": "Kimi Code",
|
|
20900
|
-
"cardName.minimax-code": "MiniMax Code",
|
|
20901
|
-
"cardName.glm-coding-plan": "GLM(ZCode 账号)",
|
|
20902
|
-
"cardName.claude": "Claude",
|
|
20903
|
-
"cardName.ollama": "Ollama",
|
|
20904
|
-
"cardName.step-code": "Step Code(Step Plan 订阅)",
|
|
20905
|
-
"cardName.cline-pass": "Cline Pass",
|
|
20906
|
-
"cardName.qoder": "Qoder(订阅)",
|
|
20907
|
-
"cardName.opendesign": "OpenDesign",
|
|
20908
|
-
"cardName.workbuddy": "WorkBuddy",
|
|
20909
|
-
"cardName.antigravity-acp": "Antigravity(ACP)",
|
|
20910
|
-
modelChecklistCount: "已启用 {count}/{total}",
|
|
20911
|
-
codeRunTitle: "代码",
|
|
20912
|
-
codeRunOutput: "输出",
|
|
20913
|
-
codeRunCopy: "复制",
|
|
20914
|
-
codeRunCopied: "已复制",
|
|
20915
|
-
codeRunWrap: "自动换行",
|
|
20916
|
-
codeRunUnwrap: "取消自动换行",
|
|
20917
|
-
codeRunInspect: "查看轨迹",
|
|
20918
|
-
codeRunPreparing: "准备中",
|
|
20919
|
-
codeRunRunning: "运行中",
|
|
20920
|
-
codeRunFailed: "失败",
|
|
20921
|
-
codeRunStopped: "已停止"
|
|
20922
|
-
};
|
|
20923
|
-
const dictionaries$3 = {
|
|
20924
|
-
zh: zh$3,
|
|
20925
|
-
en: {
|
|
20926
|
-
...accountPoolEn,
|
|
20927
|
-
title: "ChatGPT",
|
|
20928
|
-
hubTitle: "Subscriptions",
|
|
20929
|
-
intro: "Sign in with ChatGPT to use models available to your subscription in DSH.",
|
|
20930
|
-
account: "Account",
|
|
20931
|
-
signedOut: "Not signed in",
|
|
20932
|
-
signedIn: "Signed in",
|
|
20933
|
-
plan: "Plan",
|
|
20934
|
-
accountId: "Account ID",
|
|
20935
|
-
expires: "Token expires",
|
|
20936
|
-
signIn: "Sign in with ChatGPT",
|
|
20937
|
-
signInAgain: "Sign in again",
|
|
20938
|
-
cancel: "Cancel sign-in",
|
|
20939
|
-
signOut: "Sign out",
|
|
20940
|
-
refreshToken: "Refresh credentials",
|
|
20941
|
-
pending: "Complete sign-in in your browser.",
|
|
20942
|
-
popupBlocked: "The sign-in window was blocked. Use the link below to continue.",
|
|
20943
|
-
continueLogin: "Open ChatGPT sign-in",
|
|
20944
|
-
loading: "Reading status…",
|
|
20945
|
-
connection: "Connection",
|
|
20946
|
-
testConnection: "Test connection",
|
|
20947
|
-
testing: "Testing…",
|
|
20948
|
-
latency: "Last latency",
|
|
20949
|
-
selectAll: "Select all",
|
|
20950
|
-
unselectAll: "Unselect all",
|
|
20951
|
-
models: "Available models",
|
|
20952
|
-
modelsHint: "Checked models appear in the conversation model picker; unchecking all or turning off the switch hides this provider from the picker.",
|
|
20953
|
-
proxySettings: "Network Proxy",
|
|
20954
|
-
proxyMode: "Proxy Mode",
|
|
20955
|
-
proxyModeHint: "Every provider line in this plugin shares these proxy settings, including sign-in, token renewal, model catalog and quota reads. Supports system proxy detection; changes apply to subsequent requests.",
|
|
20956
|
-
proxyModeAuto: "System Proxy (Auto-detect)",
|
|
20957
|
-
proxyModeCustom: "Custom Proxy",
|
|
20958
|
-
proxyModeDirect: "Direct (No Proxy)",
|
|
20959
|
-
customProxyUrl: "Custom Proxy URL",
|
|
20960
|
-
customProxyUrlHint: "Supports HTTP/HTTPS/SOCKS5 proxy URLs, e.g. http://127.0.0.1:7890",
|
|
20961
|
-
customProxyUrlPlaceholder: "e.g. http://127.0.0.1:7890",
|
|
20962
|
-
saveProxyUrl: "Save Proxy URL",
|
|
20963
|
-
proxyDetected: "Detected system proxy",
|
|
20964
|
-
proxyDetectedEffective: " (active)",
|
|
20965
|
-
proxyNoneDetected: "No system proxy detected; connecting directly",
|
|
20966
|
-
proxyDirectHint: "Every request from this plugin connects directly without using any proxy server.",
|
|
20967
|
-
poolStorageTitle: "Account storage",
|
|
20968
|
-
poolStorageKeyring: "Desktop keyring",
|
|
20969
|
-
poolStorageCredentials: "DSH credential store",
|
|
20970
|
-
poolStorageKeyringHint: "Desktop installs only: uses the OS keyring (DPAPI / Keychain / Secret Service). On a server or a headless Linux host the keyring is usually unavailable and sign-in will fail — pick the DSH credential store instead.",
|
|
20971
|
-
poolStorageCredentialsHint: "The standard DSH secret store ($DSH_HOME/.credentials.yaml). POSIX: 0600 enforced, owner-only; Windows: profile ACL, no mode enforcement. Use this on servers and any host without a desktop keyring. Stored unencrypted at rest, protected by the host.",
|
|
20972
|
-
poolStorageEffective: "In use now: {storage}",
|
|
20973
|
-
poolStorageBackendKeyring: "desktop keyring (Secret Service), encrypted at rest",
|
|
20974
|
-
poolStorageBackendDpapi: "Windows DPAPI, encrypted at rest",
|
|
20975
|
-
poolStorageBackendKeychain: "macOS Keychain, encrypted at rest",
|
|
20976
|
-
poolStorageBackendCredentials: "DSH credential store (.credentials.yaml), protected by file permissions",
|
|
20977
|
-
poolStorageSwitchWarning: "Accounts saved in the other store stay there and are not shown until you switch back. There is no migration.",
|
|
20978
|
-
poolStorageUnavailableKeyring: "This host has no usable desktop keyring, so the account pool cannot be read or written. Switch Account storage to the DSH credential store.",
|
|
20979
|
-
poolStorageUnavailableCredentials: "This harness has no credential store (ctx.credentials), so the account pool cannot be read or written. Switch Account storage to the desktop keyring.",
|
|
20980
|
-
poolStorageUnavailableStore: "The pool store did not answer this time, so no accounts are listed here — none were deleted; reopen this page once the store answers again.",
|
|
20981
|
-
enhancements: "Enhancements",
|
|
20982
|
-
fastMode: "Fast mode (1.5x speed)",
|
|
20983
|
-
fastModeHint: "Generates tokens ~1.5x faster; consumes Codex subscription quota at ~2x–2.5x the normal rate.",
|
|
20984
|
-
outputVerbosity: "Output verbosity",
|
|
20985
|
-
outputVerbosityHint: "Controls the detail level of final Codex answers without changing reasoning effort. The default matches the official Codex client (low).",
|
|
20986
|
-
verbosityLow: "Low (keep answers concise)",
|
|
20987
|
-
verbosityMedium: "Medium (balance detail and brevity)",
|
|
20988
|
-
verbosityHigh: "High (include more detail)",
|
|
20989
|
-
reasoningSummary: "Reasoning summary",
|
|
20990
|
-
reasoningSummaryHint: "Controls how ChatGPT summarizes its chain of thought; does not change reasoning depth. The default matches the official Codex client (no summary, which saves quota).",
|
|
20991
|
-
summaryAuto: "Auto (let model determine detail)",
|
|
20992
|
-
summaryConcise: "Concise (brief summary)",
|
|
20993
|
-
summaryDetailed: "Detailed (in-depth summary)",
|
|
20994
|
-
summaryNone: "None (hide reasoning summary)",
|
|
20995
|
-
searchProvider: "Search provider",
|
|
20996
|
-
searchProviderHint: "Choose whether DSH web search uses the default provider or the Codex proxy-backed source from this ChatGPT subscription. Fetch mode \"auto\" follows this choice.",
|
|
20997
|
-
searchProviderDsh: "DSH default",
|
|
20998
|
-
searchProviderCodex: "ChatGPT (Proxy tunnel)",
|
|
20999
|
-
fetchStatus: "Fetch source (read-only)",
|
|
21000
|
-
fetchStatusHint: "Reported by the host. Read-only.",
|
|
21001
|
-
fetchConfiguredProvider: "Configured fetch provider",
|
|
21002
|
-
fetchProviderDshDefault: "DSH default (the host pins no fetch provider)",
|
|
21003
|
-
switcherState: "Fetch switcher state",
|
|
21004
|
-
switcherStateIdle: "Idle (no selection applied yet)",
|
|
21005
|
-
switcherStateApplying: "Applying (host web provider switch in progress)",
|
|
21006
|
-
switcherStateApplied: "Applied",
|
|
21007
|
-
switcherStateMissing: "No web service found to switch",
|
|
21008
|
-
switcherStateFailed: "Switch failed, check the host log",
|
|
21009
|
-
fetchMode: "Fetch mode",
|
|
21010
|
-
fetchModeAuto: "auto (fetches with the plugin when a proxy is available or the ChatGPT search source is selected)",
|
|
21011
|
-
fetchModePlugin: "plugin (always fetch with this plugin)",
|
|
21012
|
-
fetchModeDsh: "dsh (keep the DSH default fetch source)",
|
|
21013
|
-
fetchMaxBodyChars: "Plugin body limit",
|
|
21014
|
-
fetchMaxResponseBytes: "Plugin response limit",
|
|
21015
|
-
characters: "chars",
|
|
21016
|
-
bytes: "bytes",
|
|
21017
|
-
fetchLimitsInactive: "Only applied when the plugin actually fetches; the DSH default fetch source does not use these two limits.",
|
|
21018
|
-
fetchConfigSource: "Mode and limits are changed in the plugin Config, not in these settings; they take effect after a plugin reload or a DSH restart.",
|
|
21019
|
-
providerDefault: "Use provider default",
|
|
21020
|
-
contextWindows: "Model context windows",
|
|
21021
|
-
contextWindowsHint: "Lists the models checked under Available models. Each starts at its catalog value (384K for the GPT-6 family, up to 872K; up to 1M otherwise); DSH uses it for compaction and overflow detection. Values such as 872K and 512K are accepted, and a changed model can be restored one by one or all at once.",
|
|
21022
|
-
contextWindow: "Context window",
|
|
21023
|
-
contextWindowInvalid: "The context window must be a positive integer within the model limit (872K for the GPT-6 family, 1M otherwise). K and M suffixes are accepted.",
|
|
21024
|
-
contextWindowReset: "Restore default",
|
|
21025
|
-
contextWindowResetAll: "Restore all defaults",
|
|
21026
|
-
contextWindowResetAllConfirm: "Restore every changed model context window to its default?",
|
|
21027
|
-
contextWindowsNoneEnabled: "No model is checked yet. Check one under Available models above and its context window setting appears here.",
|
|
21028
|
-
saveContextWindow: "Save context window",
|
|
21029
|
-
save: "Save",
|
|
21030
|
-
tokens: "tokens",
|
|
21031
|
-
quickQuota: "Show quick usage beside the composer",
|
|
21032
|
-
quickQuotaHint: "Shown only when the current session uses a codex-chatgpt model.",
|
|
21033
|
-
quota: "Usage and limits",
|
|
21034
|
-
quotaIntro: "Data comes from the ChatGPT Codex usage service and refreshes at most once per minute while visible.",
|
|
21035
|
-
refreshQuota: "Refresh usage",
|
|
21036
|
-
refreshing: "Refreshing…",
|
|
21037
|
-
noQuota: "Your plan did not return any displayable limit windows.",
|
|
21038
|
-
quotaSignedOut: "Sign in to view subscription limits.",
|
|
21039
|
-
stale: "Showing the last successfully fetched data.",
|
|
21040
|
-
updated: "Updated",
|
|
21041
|
-
primary: "Primary window",
|
|
21042
|
-
secondary: "Secondary window",
|
|
21043
|
-
limitWindow: "limit",
|
|
21044
|
-
used: "used",
|
|
21045
|
-
remaining: "remaining",
|
|
21046
|
-
available: "Available",
|
|
21047
|
-
unavailable: "Unavailable",
|
|
21048
|
-
unlimited: "Unlimited",
|
|
21049
|
-
credits: "Credits",
|
|
21050
|
-
monthlySpend: "Monthly spend control",
|
|
21051
|
-
resetCredits: "Reset credits",
|
|
21052
|
-
resetCreditExpires: "Expires",
|
|
21053
|
-
useResetCredit: "Use reset credit",
|
|
21054
|
-
usingResetCredit: "Using…",
|
|
21055
|
-
useResetCreditConfirm: "This immediately spends one reset credit and resets eligible Codex limit windows. Continue?",
|
|
21056
|
-
resetCreditUsed: "The reset credit was used and usage data was refreshed.",
|
|
21057
|
-
spendControlReached: "Monthly spend control has been reached; new subscription calls may be limited.",
|
|
21058
|
-
limit: "Limit",
|
|
21059
|
-
exhausted: "Quota exhausted",
|
|
21060
|
-
resets: "Resets",
|
|
21061
|
-
quickQuotaLabel: "Codex left",
|
|
21062
|
-
quickQuotaLoading: "Usage…",
|
|
21063
|
-
imageToolRunning: "Generating image",
|
|
21064
|
-
imageToolDone: "Generated image",
|
|
21065
|
-
imageToolFailed: "Image generation failed",
|
|
21066
|
-
image: "Image",
|
|
21067
|
-
openImage: "Open image",
|
|
21068
|
-
openNamedImage: "Open {name}",
|
|
21069
|
-
imageLoading: "Loading image…",
|
|
21070
|
-
imageLoadFailed: "Image failed to load. Click to retry",
|
|
21071
|
-
imagePreviewClose: "Close",
|
|
21072
|
-
imagePreviewOpenOriginal: "Open original",
|
|
21073
|
-
retry: "Retry",
|
|
21074
|
-
unknown: "Unknown",
|
|
21075
|
-
hubBack: "Subscriptions",
|
|
21076
|
-
hubOverviewHint: "Pick a provider to manage its accounts, models and quota. The switch controls whether it appears in the model picker.",
|
|
21077
|
-
hubAccountCount: "{count} accounts",
|
|
21078
|
-
hubNoAccounts: "No accounts yet — open to add one",
|
|
21079
|
-
hubStateEnabled: "Enabled",
|
|
21080
|
-
hubStateDisabled: "Disabled",
|
|
21081
|
-
hubModelsEnabled: "{count} models available",
|
|
21082
|
-
hubModelsEnabledOfTotal: "{count}/{total} models available",
|
|
21083
|
-
hubStatusFailed: "Status unavailable",
|
|
21084
|
-
hubSwitchOn: "Enable {name}",
|
|
21085
|
-
hubSwitchOff: "Disable {name}",
|
|
21086
|
-
hubCardLabel: "{name}, {annotation}",
|
|
21087
|
-
hubUpdateCheck: "Check for updates",
|
|
21088
|
-
hubUpdateChecking: "Checking…",
|
|
21089
|
-
hubUpdateApply: "Update to v{version}",
|
|
21090
|
-
hubUpdateApplying: "Updating…",
|
|
21091
|
-
hubUpdateUpToDate: "Up to date ({version})",
|
|
21092
|
-
hubUpdateLatestWithUnknownCurrent: "Latest is {version}; the running version is unknown",
|
|
21093
|
-
hubUpdateAvailable: "{version} is available — you have {current}",
|
|
21094
|
-
hubUpdateInstalled: "Installed v{version} — restart the Host to apply it",
|
|
21095
|
-
hubUpdateInstalledReplaced: "Removed the old copy and installed v{version} — restart the Host to apply it",
|
|
21096
|
-
hubUpdateInstalledLive: "Installed v{version} — active now, no restart needed",
|
|
21097
|
-
hubUpdateInstalledReplacedLive: "Removed the old copy and installed v{version} — active now, no restart needed",
|
|
21098
|
-
hubUpdateFailedRestored: "Update failed; v{version} was restored",
|
|
21099
|
-
hubUpdateFailedRollbackFailed: "Update failed, and the previous version could not be reinstalled — the plugin may no longer be available",
|
|
21100
|
-
hubUpdateFailedRollbackSkipped: "Update failed, and the previous version could not be restored — the plugin may have been removed",
|
|
21101
|
-
hubUpdateDevelopmentInstall: "{version} is available, but this copy is a local link and cannot update itself",
|
|
21102
|
-
hubUpdatePluginManagerMissing: "{version} is available, but this Host exposes no pluginManager to install it",
|
|
21103
|
-
hubUpdateManualOnly: "{version} is available, but this install cannot update itself",
|
|
21104
|
-
hubUpdateCheckFailed: "Check failed: the npm registry could not be reached — check the network or proxy",
|
|
21105
|
-
hubUpdateCommandLabel: "Manual update command",
|
|
21106
|
-
localCodexLoginImport: "Import local sign-in",
|
|
21107
|
-
localCodexLoginImporting: "Importing…",
|
|
21108
|
-
deviceCodeLogin: "Device-code sign-in",
|
|
21109
|
-
deviceCodeLoginStarting: "Requesting code…",
|
|
21110
|
-
deviceCodeLoginDetail: "Add account with device code",
|
|
21111
|
-
deviceCodeHint: "Open the link below on any device and enter this code. This page finishes the sign-in by itself: nothing has to call back to a local port.",
|
|
21112
|
-
deviceCodeLabel: "Device code",
|
|
21113
|
-
deviceCodeOpen: "Open the confirmation page",
|
|
21114
|
-
deviceCodeCopy: "Copy to clipboard",
|
|
21115
|
-
deviceCodeWaiting: "Waiting for confirmation… {time} remaining",
|
|
21116
|
-
stopImporting: "Stop importing all local sign-ins",
|
|
21117
|
-
stopImportingLabel: "Stop importing all local sign-ins ({count} currently imported)",
|
|
21118
|
-
stopImportingBusy: "Stopping the import…",
|
|
21119
|
-
stopImportingHint: "Stopping the import only makes this plugin forget its copy of the local CLI sign-in; the Codex CLI own sign-in file is never deleted or changed. The account pool does not allow deleting a borrowed credential one at a time, so this stops every import at once.",
|
|
21120
|
-
"cardName.chatgpt": "ChatGPT",
|
|
21121
|
-
"cardName.command-code": "Command Code",
|
|
21122
|
-
"cardName.kimi-code": "Kimi Code",
|
|
21123
|
-
"cardName.minimax-code": "MiniMax Code",
|
|
21124
|
-
"cardName.glm-coding-plan": "GLM (ZCode Account)",
|
|
21125
|
-
"cardName.claude": "Claude",
|
|
21126
|
-
"cardName.ollama": "Ollama",
|
|
21127
|
-
"cardName.step-code": "Step Code (Step Plan Subscription)",
|
|
21128
|
-
"cardName.cline-pass": "Cline Pass",
|
|
21129
|
-
"cardName.qoder": "Qoder Subscription",
|
|
21130
|
-
"cardName.opendesign": "OpenDesign",
|
|
21131
|
-
"cardName.workbuddy": "WorkBuddy",
|
|
21132
|
-
"cardName.antigravity-acp": "Antigravity (ACP)",
|
|
21133
|
-
modelChecklistCount: "{count}/{total} enabled",
|
|
21134
|
-
codeRunTitle: "Code",
|
|
21135
|
-
codeRunOutput: "Output",
|
|
21136
|
-
codeRunCopy: "Copy",
|
|
21137
|
-
codeRunCopied: "Copied",
|
|
21138
|
-
codeRunWrap: "Wrap lines",
|
|
21139
|
-
codeRunUnwrap: "Do not wrap lines",
|
|
21140
|
-
codeRunInspect: "Inspect",
|
|
21141
|
-
codeRunPreparing: "Preparing",
|
|
21142
|
-
codeRunRunning: "Running",
|
|
21143
|
-
codeRunFailed: "Failed",
|
|
21144
|
-
codeRunStopped: "Stopped"
|
|
21145
|
-
}
|
|
21146
|
-
};
|
|
21147
|
-
//#endregion
|
|
21148
21330
|
//#region src/shared/i18n-contracts.ts
|
|
21149
21331
|
/**
|
|
21150
21332
|
* Language ids this plugin speaks, and the one parser that decides which one a
|
|
@@ -21917,7 +22099,7 @@ window.__ModuleLoader__.load({
|
|
|
21917
22099
|
modelsHint: "Отмеченные модели появляются в списке выбора модели на странице диалога; если снять все отметки или выключить переключатель выше, провайдер исчезнет из списка.",
|
|
21918
22100
|
proxySettings: "Сетевой прокси",
|
|
21919
22101
|
proxyMode: "Режим прокси",
|
|
21920
|
-
proxyModeHint: "
|
|
22102
|
+
proxyModeHint: "Влияет только на эту линию: её диалоги, вход и обновление токенов, каталог моделей и чтение квот; поддерживается автоопределение системного прокси, изменения действуют на последующие запросы.",
|
|
21921
22103
|
proxyModeAuto: "Системный прокси (автоопределение)",
|
|
21922
22104
|
proxyModeCustom: "Свой прокси",
|
|
21923
22105
|
proxyModeDirect: "Напрямую (без прокси)",
|
|
@@ -21925,6 +22107,12 @@ window.__ModuleLoader__.load({
|
|
|
21925
22107
|
customProxyUrlHint: "Поддерживаются адреса HTTP/HTTPS/SOCKS5, например http://127.0.0.1:7890",
|
|
21926
22108
|
customProxyUrlPlaceholder: "например http://127.0.0.1:7890",
|
|
21927
22109
|
saveProxyUrl: "Сохранить адрес прокси",
|
|
22110
|
+
noProxy: "Хосты в обход прокси",
|
|
22111
|
+
noProxyHint: "Эти хосты всегда подключаются напрямую. Список действует глобально и общий для всех линий. Разделяйте записи запятыми или пробелами; поддерживаются точные хосты, суффиксы доменов (api.corp.example) и host:port; список объединяется с NO_PROXY из переменных окружения и $DSH_HOME/.env.",
|
|
22112
|
+
noProxyPlaceholder: "например copilot.tencent.com, *.corp.example, gateway.lan:8080",
|
|
22113
|
+
saveNoProxy: "Сохранить список обхода",
|
|
22114
|
+
proxyDirectActive: "Сейчас действует: напрямую (без прокси)",
|
|
22115
|
+
proxyActiveTemplate: "Сейчас действует: {proxy}",
|
|
21928
22116
|
proxyDetected: "Обнаружен системный прокси",
|
|
21929
22117
|
proxyDetectedEffective: " (уже действует)",
|
|
21930
22118
|
proxyNoneDetected: "Системный прокси не обнаружен, соединение напрямую",
|
|
@@ -22636,6 +22824,7 @@ window.__ModuleLoader__.load({
|
|
|
22636
22824
|
scopePrompt: "В ACP нет отдельного слота системного промпта: системный промпт DSH передаётся в начале запроса, а собственный системный промпт официального агента убрать нельзя.",
|
|
22637
22825
|
scopeHistory: "После нормального завершения сессия паркуется вместе с процессом для повторного использования: если отпечаток префикса и набор инструментов не изменились, следующее сообщение отправляет только приращение; полная перестройка с повторной отправкой и якорем нужна лишь при сжатии или переписывании истории, смене набора инструментов или смерти процесса.",
|
|
22638
22826
|
scopeTools: "Как основная модель линия выполняет вызовы инструментов через DSH и под его контролем; как субагент дочерний процесс использует собственные инструменты официального агента.",
|
|
22827
|
+
scopeNetwork: "Сетевые запросы этой линии выполняет сам официальный CLI (agy); плагин не может назначить ей отдельный прокси, и настройки прокси в других местах на неё не действуют.",
|
|
22639
22828
|
scopeQuota: "Официальный сервер не публикует остаток квоты, поэтому карточка не показывает ни процентов, ни баланса.",
|
|
22640
22829
|
error: "Не удалось выполнить действие: {detail}",
|
|
22641
22830
|
complianceSummary: "Риск по условиям (нажмите, чтобы прочитать)",
|
|
@@ -24260,7 +24449,7 @@ window.__ModuleLoader__.load({
|
|
|
24260
24449
|
//#region src/client/minimax-code/MinimaxVideoDocumentBody.tsx
|
|
24261
24450
|
/** 兜底翻译:只在没有 locale 座位时用到。 */
|
|
24262
24451
|
function translate$1(key) {
|
|
24263
|
-
return zh$
|
|
24452
|
+
return zh$12[key] ?? key;
|
|
24264
24453
|
}
|
|
24265
24454
|
/**
|
|
24266
24455
|
* 一个文件地址里的会话与路径。
|
|
@@ -24396,7 +24585,7 @@ window.__ModuleLoader__.load({
|
|
|
24396
24585
|
*/
|
|
24397
24586
|
/** 兜底翻译:只在没有 locale 座位时用到,走同一份 zh 字典。 */
|
|
24398
24587
|
function translate(key) {
|
|
24399
|
-
return zh$
|
|
24588
|
+
return zh$12[key] ?? key;
|
|
24400
24589
|
}
|
|
24401
24590
|
/**
|
|
24402
24591
|
* 一张视频工具卡片。
|
|
@@ -24852,7 +25041,7 @@ window.__ModuleLoader__.load({
|
|
|
24852
25041
|
* 没有快照、没有窗口、或全部窗口都没有百分比时返回 null,即**不渲染胶囊**:
|
|
24853
25042
|
* 契约允许 quota 为 null,装一个占位数字比不显示更像坏了。
|
|
24854
25043
|
*/
|
|
24855
|
-
function selectBadgeFacts$3(status, lookup = (key) => zh$
|
|
25044
|
+
function selectBadgeFacts$3(status, lookup = (key) => zh$11[key]) {
|
|
24856
25045
|
const measured = (status?.quota?.windows ?? []).filter((window) => typeof window.usedPercent === "number" && Number.isFinite(window.usedPercent));
|
|
24857
25046
|
if (measured.length === 0) return null;
|
|
24858
25047
|
const tightest = measured.reduce((best, window) => {
|
|
@@ -24948,7 +25137,7 @@ window.__ModuleLoader__.load({
|
|
|
24948
25137
|
* single most misleading pixel on the page.
|
|
24949
25138
|
*/
|
|
24950
25139
|
function AntigravityAcpComposerBadge(props) {
|
|
24951
|
-
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$
|
|
25140
|
+
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$8);
|
|
24952
25141
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComposerQuotaBadge, {
|
|
24953
25142
|
directory: props.directory,
|
|
24954
25143
|
loadModelDirectory: props.loadModelDirectory,
|
|
@@ -25032,7 +25221,7 @@ window.__ModuleLoader__.load({
|
|
|
25032
25221
|
*
|
|
25033
25222
|
* 没有快照、没有窗口、或全部窗口都没有百分比时返回 null(见文件头)。
|
|
25034
25223
|
*/
|
|
25035
|
-
function selectBadgeFacts$2(status, lookup = (key) => zh$
|
|
25224
|
+
function selectBadgeFacts$2(status, lookup = (key) => zh$7[key]) {
|
|
25036
25225
|
const quota = status?.quota;
|
|
25037
25226
|
if (quota === null || quota === void 0) return null;
|
|
25038
25227
|
if (quota.kind !== "windowed") return null;
|
|
@@ -25179,7 +25368,7 @@ window.__ModuleLoader__.load({
|
|
|
25179
25368
|
directory: props.directory,
|
|
25180
25369
|
loadModelDirectory: props.loadModelDirectory,
|
|
25181
25370
|
providerId: "cline-pass",
|
|
25182
|
-
label: zh$
|
|
25371
|
+
label: zh$6.composerLabel,
|
|
25183
25372
|
readStatus: (refresh) => API$1.status(refresh),
|
|
25184
25373
|
selectFacts: selectClinePassFacts
|
|
25185
25374
|
});
|
|
@@ -25265,7 +25454,7 @@ window.__ModuleLoader__.load({
|
|
|
25265
25454
|
* 另外那只可能还剩一大半。所以这里不平均、不取最小剩余,而是取最大已用比例。
|
|
25266
25455
|
* 没有快照、没有桶、或全部桶都没有总额时返回 null(见文件头)。
|
|
25267
25456
|
*/
|
|
25268
|
-
function selectBadgeFacts$1(status, lookup = (key) => zh$
|
|
25457
|
+
function selectBadgeFacts$1(status, lookup = (key) => zh$5[key]) {
|
|
25269
25458
|
const quota = status?.quota;
|
|
25270
25459
|
if (quota === null || quota === void 0) return null;
|
|
25271
25460
|
const measurable = quota.buckets.filter((bucket) => bucket.total !== null && bucket.total > 0 && bucket.used !== null);
|
|
@@ -25275,7 +25464,7 @@ window.__ModuleLoader__.load({
|
|
|
25275
25464
|
const remaining = Math.round((1 - used) * 100);
|
|
25276
25465
|
const unit = tightest.unit !== null && tightest.unit !== "" ? " " + tightest.unit : "";
|
|
25277
25466
|
const bucketLabel = quotaBucketText(tightest.kind, {
|
|
25278
|
-
...zh$
|
|
25467
|
+
...zh$5,
|
|
25279
25468
|
quotaBucketPersonal: lookup("quotaBucketPersonal"),
|
|
25280
25469
|
quotaBucketAddOn: lookup("quotaBucketAddOn"),
|
|
25281
25470
|
quotaBucketOrg: lookup("quotaBucketOrg")
|
|
@@ -25386,7 +25575,7 @@ window.__ModuleLoader__.load({
|
|
|
25386
25575
|
directory: props.directory,
|
|
25387
25576
|
loadModelDirectory: props.loadModelDirectory,
|
|
25388
25577
|
providerId: "opendesign",
|
|
25389
|
-
label: zh$
|
|
25578
|
+
label: zh$4.composerLabel,
|
|
25390
25579
|
readStatus: () => API.status(),
|
|
25391
25580
|
selectFacts: selectOpenDesignFacts
|
|
25392
25581
|
});
|
|
@@ -25407,9 +25596,9 @@ window.__ModuleLoader__.load({
|
|
|
25407
25596
|
* is not), and one decimal is what keeps "1.5 小时" from reading as "2 小时".
|
|
25408
25597
|
*/
|
|
25409
25598
|
function planWindowName(seconds) {
|
|
25410
|
-
if (seconds >= 86400 && seconds % 86400 === 0) return zh$
|
|
25411
|
-
if (seconds >= 3600) return zh$
|
|
25412
|
-
return zh$
|
|
25599
|
+
if (seconds >= 86400 && seconds % 86400 === 0) return zh$4.usageWindowDays.replace("{count}", String(seconds / 86400));
|
|
25600
|
+
if (seconds >= 3600) return zh$4.usageWindowHours.replace("{count}", formatDecimal(seconds / 3600));
|
|
25601
|
+
return zh$4.usageWindowMinutes.replace("{count}", formatDecimal(seconds / 60));
|
|
25413
25602
|
}
|
|
25414
25603
|
/** What a window still has, from the grant and the remainder it states. */
|
|
25415
25604
|
function windowRemaining(limitCredits, remainingCredits) {
|
|
@@ -25442,7 +25631,7 @@ window.__ModuleLoader__.load({
|
|
|
25442
25631
|
const primaryId = status.pool.activeAccountId ?? status.pool.accounts.find((account) => account.isPrimary)?.id;
|
|
25443
25632
|
const reading = readings.find((account) => account.accountId === primaryId) ?? readings[0];
|
|
25444
25633
|
const amount = reading.balanceUsd;
|
|
25445
|
-
const readAt = zh$
|
|
25634
|
+
const readAt = zh$4.usageReadAt.replace("{time}", new Date(reading.fetchedAt).toLocaleTimeString());
|
|
25446
25635
|
const windows = planWindows(reading.codingPlan);
|
|
25447
25636
|
if (windows.length === 0) return {
|
|
25448
25637
|
text: `$${amount}`,
|
|
@@ -25451,8 +25640,8 @@ window.__ModuleLoader__.load({
|
|
|
25451
25640
|
};
|
|
25452
25641
|
const narrowest = windows[0];
|
|
25453
25642
|
return {
|
|
25454
|
-
text: zh$
|
|
25455
|
-
tooltip: `${reading.alias} · ${windows.map((window) => `${window.name} ${zh$
|
|
25643
|
+
text: zh$4.usageWindowRemaining.replace("{remaining}", formatDecimal(narrowest.remaining)),
|
|
25644
|
+
tooltip: `${reading.alias} · ${windows.map((window) => `${window.name} ${zh$4.usageWindowRemaining.replace("{remaining}", formatDecimal(window.remaining))}`).join(" · ")} · ${readAt}`,
|
|
25456
25645
|
level: quotaLevel(narrowest.remaining),
|
|
25457
25646
|
percent: narrowest.remaining
|
|
25458
25647
|
};
|
|
@@ -27281,7 +27470,7 @@ window.__ModuleLoader__.load({
|
|
|
27281
27470
|
}
|
|
27282
27471
|
/** 兜底翻译:只在没有 locale 服务时用到(测试、以及菜单渲染早于字典注册)。 */
|
|
27283
27472
|
function fallbackTranslate$3(key, params) {
|
|
27284
|
-
const template = zh$
|
|
27473
|
+
const template = zh$12[key] ?? key;
|
|
27285
27474
|
if (params === void 0) return template;
|
|
27286
27475
|
return template.replace(/\{(\w+)\}/g, (_match, name) => String(params[name] ?? ""));
|
|
27287
27476
|
}
|
|
@@ -56579,7 +56768,7 @@ window.__ModuleLoader__.load({
|
|
|
56579
56768
|
providerId: "workbuddy-subscription",
|
|
56580
56769
|
readStatus: (refresh) => refresh ? api.post("/quota") : api.get("/status"),
|
|
56581
56770
|
selectFacts: selectBadgeFacts,
|
|
56582
|
-
label: useLineDict(NS_WORKBUDDY, zh$
|
|
56771
|
+
label: useLineDict(NS_WORKBUDDY, zh$3).composerLabel
|
|
56583
56772
|
});
|
|
56584
56773
|
}
|
|
56585
56774
|
//#endregion
|
|
@@ -59909,7 +60098,7 @@ window.__ModuleLoader__.load({
|
|
|
59909
60098
|
* @module @eddyskywalker/dsh-chatgpt-subscription/client/codemode/CodeRunToolView
|
|
59910
60099
|
*/
|
|
59911
60100
|
function fallbackTranslate(key) {
|
|
59912
|
-
return zh$
|
|
60101
|
+
return zh$15[key] ?? key;
|
|
59913
60102
|
}
|
|
59914
60103
|
function firstLine(text) {
|
|
59915
60104
|
const nl = text.indexOf("\n");
|
|
@@ -60667,36 +60856,36 @@ window.__ModuleLoader__.load({
|
|
|
60667
60856
|
installLineLocale(ctx.locale);
|
|
60668
60857
|
ctx.effect(() => installHostLocaleMirror(ctx.locale), "dsh-chatgpt-subscription: host locale mirror");
|
|
60669
60858
|
installRussianLocale(ctx);
|
|
60670
|
-
ctx.effect(() => ctx.locale.register(NS, dictionaries$
|
|
60859
|
+
ctx.effect(() => ctx.locale.register(NS, dictionaries$15), "dsh-chatgpt-subscription: dictionaries");
|
|
60671
60860
|
ctx.effect(() => installStyles(), "dsh-chatgpt-subscription: styles");
|
|
60672
60861
|
ctx.effect(() => {
|
|
60673
60862
|
installHubStyles();
|
|
60674
60863
|
installModelChecklistStyles();
|
|
60675
60864
|
return () => {};
|
|
60676
60865
|
}, "dsh-chatgpt-subscription: hub styles");
|
|
60677
|
-
ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$
|
|
60866
|
+
ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$10), "dsh-claude: dictionaries");
|
|
60678
60867
|
ctx.effect(() => {
|
|
60679
60868
|
installClaudeStyles();
|
|
60680
60869
|
return () => {};
|
|
60681
60870
|
}, "dsh-claude: styles");
|
|
60682
|
-
ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$
|
|
60683
|
-
ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$
|
|
60871
|
+
ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$14), "dsh-command-code: dictionaries");
|
|
60872
|
+
ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$13), "dsh-kimi-code: dictionaries");
|
|
60684
60873
|
ctx.effect(() => {
|
|
60685
60874
|
installKimiCodeStyles();
|
|
60686
60875
|
return () => {};
|
|
60687
60876
|
}, "dsh-kimi-code: styles");
|
|
60688
|
-
ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$
|
|
60877
|
+
ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$12), "dsh-minimax-code: dictionaries");
|
|
60689
60878
|
ctx.effect(() => {
|
|
60690
60879
|
installMinimaxCodeStyles();
|
|
60691
60880
|
return () => {};
|
|
60692
60881
|
}, "dsh-minimax-code: styles");
|
|
60693
|
-
ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$
|
|
60882
|
+
ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$11), "dsh-glm-coding-plan: dictionaries");
|
|
60694
60883
|
ctx.effect(() => {
|
|
60695
60884
|
installGlmCodingPlanStyles();
|
|
60696
60885
|
return () => {};
|
|
60697
60886
|
}, "dsh-glm-coding-plan: styles");
|
|
60698
|
-
ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$
|
|
60699
|
-
ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY_ACP, dictionaries$
|
|
60887
|
+
ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$9), "dsh-ollama: dictionaries");
|
|
60888
|
+
ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY_ACP, dictionaries$8), "dsh-antigravity-acp: dictionaries");
|
|
60700
60889
|
ctx.effect(() => {
|
|
60701
60890
|
installAntigravityAcpStyles();
|
|
60702
60891
|
return () => {};
|
|
@@ -60706,27 +60895,27 @@ window.__ModuleLoader__.load({
|
|
|
60706
60895
|
installProgressUpdatesStyles();
|
|
60707
60896
|
return () => {};
|
|
60708
60897
|
}, "dsh-progress-updates: styles");
|
|
60709
|
-
ctx.effect(() => ctx.locale.register(NS_STEP_CODE, dictionaries$
|
|
60898
|
+
ctx.effect(() => ctx.locale.register(NS_STEP_CODE, dictionaries$7), "dsh-step-code: dictionaries");
|
|
60710
60899
|
ctx.effect(() => {
|
|
60711
60900
|
installStepCodeStyles();
|
|
60712
60901
|
return () => {};
|
|
60713
60902
|
}, "dsh-step-code: styles");
|
|
60714
|
-
ctx.effect(() => ctx.locale.register(NS_CLINE_PASS, dictionaries$
|
|
60903
|
+
ctx.effect(() => ctx.locale.register(NS_CLINE_PASS, dictionaries$6), "dsh-cline-pass: dictionaries");
|
|
60715
60904
|
ctx.effect(() => {
|
|
60716
60905
|
installClinePassStyles();
|
|
60717
60906
|
return () => {};
|
|
60718
60907
|
}, "dsh-cline-pass: styles");
|
|
60719
|
-
ctx.effect(() => ctx.locale.register(NS_QODER, dictionaries$
|
|
60908
|
+
ctx.effect(() => ctx.locale.register(NS_QODER, dictionaries$5), "dsh-qoder: dictionaries");
|
|
60720
60909
|
ctx.effect(() => {
|
|
60721
60910
|
installQoderStyles();
|
|
60722
60911
|
return () => {};
|
|
60723
60912
|
}, "dsh-qoder: styles");
|
|
60724
|
-
ctx.effect(() => ctx.locale.register(NS_OPENDESIGN, dictionaries$
|
|
60913
|
+
ctx.effect(() => ctx.locale.register(NS_OPENDESIGN, dictionaries$4), "dsh-opendesign: dictionaries");
|
|
60725
60914
|
ctx.effect(() => {
|
|
60726
60915
|
installOpenDesignStyles();
|
|
60727
60916
|
return () => {};
|
|
60728
60917
|
}, "dsh-opendesign: styles");
|
|
60729
|
-
ctx.effect(() => ctx.locale.register(NS_WORKBUDDY, dictionaries$
|
|
60918
|
+
ctx.effect(() => ctx.locale.register(NS_WORKBUDDY, dictionaries$3), "dsh-workbuddy: dictionaries");
|
|
60730
60919
|
ctx.effect(() => {
|
|
60731
60920
|
installWorkBuddyStyles();
|
|
60732
60921
|
return () => {};
|