dsh-codex-subscription 3.2.16 → 3.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -2354,7 +2354,8 @@ window.__ModuleLoader__.load({
2354
2354
  voiceLang_ru: "Русский",
2355
2355
  voicePreviewHint: "切换回答语言会播放该语言的试听;选择自动跟随时,试听使用英语。",
2356
2356
  remoteHint: "开启后,这台电脑上的 DSH 会出现在 ChatGPT 手机 App 的 Codex 主机列表里,可用手机查看对话、发消息、切换模型和审批。需要订阅账号登录;电脑要保持开机和联网。",
2357
- remoteConnected: "电脑已连上 ChatGPT,还没有手机连接",
2357
+ remoteConnected: "此电脑已连接 ChatGPT",
2358
+ remoteOpenPairedHost: "手机已配对。请在手机的 ChatGPT 应用中打开 Codex 并选择此电脑。",
2358
2359
  remoteConnecting: "正在连接",
2359
2360
  remoteWaiting: "正在等待上一次连接释放,通常几分钟内自动连上",
2360
2361
  remoteUnauthorizedHelp: "服务器拒绝了手机远程(401/403)。请先确认 ChatGPT 登录没有过期;如果登录正常,可能是账号还没开启两步验证(这只是推测),请到 ChatGPT 安全设置里开启后再试。",
@@ -2364,7 +2365,7 @@ window.__ModuleLoader__.load({
2364
2365
  remotePaired: "已配对的手机",
2365
2366
  remoteNoPhones: "还没有手机配对。",
2366
2367
  remoteRevoke: "移除",
2367
- remoteLastSeen: "最近 {date}",
2368
+ remoteLastSeen: "上次活动 {date}",
2368
2369
  remotePhoneUnknown: "未命名手机",
2369
2370
  remotePhones: "手机已连接 {count} 部",
2370
2371
  remotePair: "显示配对码",
@@ -2940,7 +2941,8 @@ window.__ModuleLoader__.load({
2940
2941
  toolsScopeOff: "现在:只有 GPT / Codex 模型的对话会用这些功能。",
2941
2942
  toolsScopeChange: "更改",
2942
2943
  creativeSketch: "草图画板 · Beta",
2943
- diagnosticsHint: "遇到问题时生成报告,可复制后用于反馈。不含登录凭据和账号标识。",
2944
+ diagnosticsDownload: "下载报告",
2945
+ diagnosticsHint: "生成报告后可复制或下载,用于反馈问题。报告不含登录凭据和账号标识。",
2944
2946
  sketchCanvasSetting: "画板入口",
2945
2947
  sketchAgentSetting: "Agent 绘图",
2946
2948
  quotaShowIndicator: "显示额度",
@@ -3299,7 +3301,8 @@ window.__ModuleLoader__.load({
3299
3301
  voiceLang_ru: "Русский",
3300
3302
  voicePreviewHint: "Changing the answer language plays a sample in that language. Auto uses an English sample.",
3301
3303
  remoteHint: "When on, this computer's DSH appears as a host in the ChatGPT mobile app's Codex list, so you can follow conversations, send messages, switch models and approve actions from your phone. Needs a signed-in subscription account; the computer must stay on and online.",
3302
- remoteConnected: "This computer is online with ChatGPT; no phone connected yet",
3304
+ remoteConnected: "This computer is connected to ChatGPT",
3305
+ remoteOpenPairedHost: "Your phone is paired. Open Codex in the ChatGPT app on your phone and select this computer.",
3303
3306
  remoteConnecting: "Connecting",
3304
3307
  remoteWaiting: "Waiting for the previous connection to be released; usually reconnects within a few minutes",
3305
3308
  remoteUnauthorizedHelp: "The server refused Remote Control (401/403). Check that your ChatGPT sign-in has not expired; if it is fine, the account may need two-step verification turned on (a guess) in ChatGPT security settings.",
@@ -3886,7 +3889,8 @@ window.__ModuleLoader__.load({
3886
3889
  toolsScopeOff: "Now: only GPT / Codex conversations use these features.",
3887
3890
  toolsScopeChange: "Change",
3888
3891
  creativeSketch: "Sketch board · Beta",
3889
- diagnosticsHint: "Generate a report to copy into a support request. Sign-in credentials and account identifiers are excluded.",
3892
+ diagnosticsDownload: "Download report",
3893
+ diagnosticsHint: "Create a report you can copy or download for a support request. Sign-in credentials and account identifiers are excluded.",
3890
3894
  sketchCanvasSetting: "Board entry",
3891
3895
  sketchAgentSetting: "Agent drawing",
3892
3896
  quotaShowIndicator: "Show quota",
@@ -4244,7 +4248,8 @@ window.__ModuleLoader__.load({
4244
4248
  "voiceLang_ru": "Русский",
4245
4249
  "voicePreviewHint": "回答言語を変更すると、その言語のサンプルが再生されます。「自動」では英語のサンプルを使います。",
4246
4250
  "remoteHint": "オンにすると、このコンピューターの DSH が ChatGPT モバイルアプリの Codex 一覧にホストとして表示されます。スマートフォンから会話の確認、メッセージの送信、モデルの切り替え、操作の承認ができます。サインイン済みのサブスクリプションアカウントが必要です。また、コンピューターの電源を入れ、オンラインにしておく必要があります。",
4247
- "remoteConnected": "このコンピューターは ChatGPT に接続中です。スマートフォンはまだ接続されていません",
4251
+ "remoteConnected": "このコンピューターは ChatGPT に接続済みです",
4252
+ "remoteOpenPairedHost": "スマートフォンはペアリング済みです。スマートフォンの ChatGPT アプリで Codex を開き、このコンピューターを選んでください。",
4248
4253
  "remoteConnecting": "接続中",
4249
4254
  "remoteWaiting": "前の接続が解放されるのを待っています。通常は数分以内に再接続されます",
4250
4255
  "remoteUnauthorizedHelp": "サーバーがリモート操作を拒否しました(401/403)。ChatGPT のサインインが期限切れでないか確認してください。問題がなければ、ChatGPT のセキュリティ設定で2段階認証を有効にする必要があるかもしれません(推測)。",
@@ -4578,6 +4583,7 @@ window.__ModuleLoader__.load({
4578
4583
  "diagnosticsLoad": "レポートを作成",
4579
4584
  "diagnosticsLoading": "作成中…",
4580
4585
  "diagnosticsCopy": "レポートをコピー",
4586
+ "diagnosticsDownload": "レポートを保存",
4581
4587
  "diagnosticsPreview": "レポートを表示",
4582
4588
  "diagnosticsCopyFull": "レポート全体をコピー",
4583
4589
  "diagnosticsCopied": "コピーしました",
@@ -5190,7 +5196,8 @@ window.__ModuleLoader__.load({
5190
5196
  "voiceLang_ru": "Русский",
5191
5197
  "voicePreviewHint": "Al cambiar el idioma de respuesta, se reproduce una muestra en ese idioma. Automático usa una muestra en inglés.",
5192
5198
  "remoteHint": "Al activarlo, el DSH de este equipo aparece como anfitrión en la lista de Codex de la aplicación móvil de ChatGPT. Desde el teléfono podrás seguir conversaciones, enviar mensajes, cambiar de modelo y aprobar acciones. Requiere una cuenta de suscripción con sesión iniciada; el equipo debe permanecer encendido y conectado.",
5193
- "remoteConnected": "Este equipo está conectado a ChatGPT; aún no hay ningún teléfono conectado",
5199
+ "remoteConnected": "Este equipo está conectado a ChatGPT",
5200
+ "remoteOpenPairedHost": "Tu teléfono está vinculado. Abre Codex en la app de ChatGPT del teléfono y selecciona este equipo.",
5194
5201
  "remoteConnecting": "Conectando",
5195
5202
  "remoteWaiting": "Esperando a que se libere la conexión anterior; normalmente se reconecta en unos minutos",
5196
5203
  "remoteUnauthorizedHelp": "El servidor rechazó el Control remoto (401/403). Comprueba que tu sesión de ChatGPT no haya caducado. Si sigue activa, quizá la cuenta necesite tener activada la verificación en dos pasos (es una suposición) en los ajustes de seguridad de ChatGPT.",
@@ -5524,6 +5531,7 @@ window.__ModuleLoader__.load({
5524
5531
  "diagnosticsLoad": "Crear informe",
5525
5532
  "diagnosticsLoading": "Creando…",
5526
5533
  "diagnosticsCopy": "Copiar informe",
5534
+ "diagnosticsDownload": "Descargar informe",
5527
5535
  "diagnosticsPreview": "Ver informe",
5528
5536
  "diagnosticsCopyFull": "Copiar informe completo",
5529
5537
  "diagnosticsCopied": "Copiado",
@@ -6136,7 +6144,8 @@ window.__ModuleLoader__.load({
6136
6144
  "voiceLang_ru": "Русский",
6137
6145
  "voicePreviewHint": "Changer la langue des réponses lance un échantillon dans cette langue. Auto utilise un échantillon anglais.",
6138
6146
  "remoteHint": "Une fois activé, le DSH de cet ordinateur apparaît comme hôte dans la liste Codex de l’application mobile ChatGPT. Vous pouvez suivre les conversations, envoyer des messages, changer de modèle et approuver des actions depuis votre téléphone. Un compte d’abonnement connecté est requis ; l’ordinateur doit rester allumé et connecté à Internet.",
6139
- "remoteConnected": "Cet ordinateur est connecté à ChatGPT ; aucun téléphone n’est encore connecté",
6147
+ "remoteConnected": "Cet ordinateur est connecté à ChatGPT",
6148
+ "remoteOpenPairedHost": "Votre téléphone est associé. Ouvrez Codex dans l’application ChatGPT sur votre téléphone et sélectionnez cet ordinateur.",
6140
6149
  "remoteConnecting": "Connexion en cours",
6141
6150
  "remoteWaiting": "En attente de la libération de la connexion précédente ; reconnexion généralement possible en quelques minutes",
6142
6151
  "remoteUnauthorizedHelp": "Le serveur a refusé le contrôle à distance (401/403). Vérifiez que votre session ChatGPT est toujours active ; si c’est le cas, il est possible que la validation en deux étapes doive être activée dans les paramètres de sécurité ChatGPT (à confirmer).",
@@ -6470,6 +6479,7 @@ window.__ModuleLoader__.load({
6470
6479
  "diagnosticsLoad": "Créer un rapport",
6471
6480
  "diagnosticsLoading": "Création…",
6472
6481
  "diagnosticsCopy": "Copier le rapport",
6482
+ "diagnosticsDownload": "Télécharger le rapport",
6473
6483
  "diagnosticsPreview": "Voir le rapport",
6474
6484
  "diagnosticsCopyFull": "Copier le rapport complet",
6475
6485
  "diagnosticsCopied": "Copié",
@@ -7082,7 +7092,8 @@ window.__ModuleLoader__.load({
7082
7092
  "voiceLang_ru": "Русский",
7083
7093
  "voicePreviewHint": "Beim Ändern der Antwortsprache wird ein Hörbeispiel in dieser Sprache abgespielt. „Auto“ verwendet ein englisches Hörbeispiel.",
7084
7094
  "remoteHint": "Wenn aktiviert, erscheint dieser Computer als Host in der Codex-Liste der ChatGPT-Mobil-App. So kannst du Unterhaltungen verfolgen, Nachrichten senden, Modelle wechseln und Aktionen per Smartphone freigeben. Erfordert ein angemeldetes Abo-Konto; der Computer muss eingeschaltet und online bleiben.",
7085
- "remoteConnected": "Dieser Computer ist mit ChatGPT verbunden; noch kein Smartphone verbunden",
7095
+ "remoteConnected": "Dieser Computer ist mit ChatGPT verbunden",
7096
+ "remoteOpenPairedHost": "Dein Smartphone ist gekoppelt. Öffne Codex in der ChatGPT-App auf dem Smartphone und wähle diesen Computer aus.",
7086
7097
  "remoteConnecting": "Verbindung wird hergestellt",
7087
7098
  "remoteWaiting": "Wartet darauf, dass die vorherige Verbindung freigegeben wird; die Verbindung wird meist innerhalb weniger Minuten wiederhergestellt",
7088
7099
  "remoteUnauthorizedHelp": "Der Server hat die Fernsteuerung abgelehnt (401/403). Prüfe, ob deine ChatGPT-Anmeldung abgelaufen ist. Falls nicht, muss für das Konto möglicherweise die zweistufige Verifizierung in den ChatGPT-Sicherheitseinstellungen aktiviert sein (Vermutung).",
@@ -7416,6 +7427,7 @@ window.__ModuleLoader__.load({
7416
7427
  "diagnosticsLoad": "Bericht erstellen",
7417
7428
  "diagnosticsLoading": "Wird erstellt…",
7418
7429
  "diagnosticsCopy": "Bericht kopieren",
7430
+ "diagnosticsDownload": "Bericht herunterladen",
7419
7431
  "diagnosticsPreview": "Bericht ansehen",
7420
7432
  "diagnosticsCopyFull": "Vollständigen Bericht kopieren",
7421
7433
  "diagnosticsCopied": "Kopiert",
@@ -8028,7 +8040,8 @@ window.__ModuleLoader__.load({
8028
8040
  "voiceLang_ru": "Русский",
8029
8041
  "voicePreviewHint": "При смене языка ответа воспроизводится образец на этом языке. Для «Авто» используется образец на английском.",
8030
8042
  "remoteHint": "Если включено, DSH на этом компьютере появится как хост в списке Codex мобильного приложения ChatGPT. С телефона можно следить за диалогами, отправлять сообщения, менять модели и подтверждать действия. Нужен выполненный вход в аккаунт с подпиской; компьютер должен оставаться включённым и подключённым к сети.",
8031
- "remoteConnected": "Этот компьютер подключён к ChatGPT; телефон пока не подключён",
8043
+ "remoteConnected": "Этот компьютер подключён к ChatGPT",
8044
+ "remoteOpenPairedHost": "Телефон уже сопряжён. Откройте Codex в приложении ChatGPT на телефоне и выберите этот компьютер.",
8032
8045
  "remoteConnecting": "Подключение",
8033
8046
  "remoteWaiting": "Ожидание освобождения предыдущего подключения; обычно оно восстанавливается через несколько минут",
8034
8047
  "remoteUnauthorizedHelp": "Сервер отклонил удалённое управление (401/403). Проверьте, не истёк ли вход в ChatGPT; если всё в порядке, возможно, в настройках безопасности ChatGPT нужно включить двухэтапную проверку (предположение).",
@@ -8362,6 +8375,7 @@ window.__ModuleLoader__.load({
8362
8375
  "diagnosticsLoad": "Создать отчёт",
8363
8376
  "diagnosticsLoading": "Создание…",
8364
8377
  "diagnosticsCopy": "Скопировать отчёт",
8378
+ "diagnosticsDownload": "Скачать отчёт",
8365
8379
  "diagnosticsPreview": "Посмотреть отчёт",
8366
8380
  "diagnosticsCopyFull": "Скопировать полный отчёт",
8367
8381
  "diagnosticsCopied": "Скопировано",
@@ -8974,7 +8988,8 @@ window.__ModuleLoader__.load({
8974
8988
  "voiceLang_ru": "Русский",
8975
8989
  "voicePreviewHint": "Ao alterar o idioma da resposta, uma amostra será reproduzida nesse idioma. Automático usa uma amostra em inglês.",
8976
8990
  "remoteHint": "Quando ativado, este computador aparece como host na lista Codex do app móvel do ChatGPT. Pelo celular, você pode acompanhar conversas, enviar mensagens, trocar de modelo e aprovar ações. Requer uma conta de assinatura conectada; o computador precisa permanecer ligado e conectado à internet.",
8977
- "remoteConnected": "Este computador está conectado ao ChatGPT; nenhum celular conectado ainda",
8991
+ "remoteConnected": "Este computador está conectado ao ChatGPT",
8992
+ "remoteOpenPairedHost": "Seu celular está pareado. Abra o Codex no app do ChatGPT no celular e selecione este computador.",
8978
8993
  "remoteConnecting": "Conectando",
8979
8994
  "remoteWaiting": "Aguardando a conexão anterior ser liberada; normalmente reconecta em alguns minutos",
8980
8995
  "remoteUnauthorizedHelp": "O servidor recusou o Controle remoto (401/403). Verifique se sua sessão do ChatGPT não expirou; se estiver válida, talvez seja necessário ativar a verificação em duas etapas nas configurações de segurança do ChatGPT (suposição).",
@@ -9308,6 +9323,7 @@ window.__ModuleLoader__.load({
9308
9323
  "diagnosticsLoad": "Criar relatório",
9309
9324
  "diagnosticsLoading": "Criando…",
9310
9325
  "diagnosticsCopy": "Copiar relatório",
9326
+ "diagnosticsDownload": "Baixar relatório",
9311
9327
  "diagnosticsPreview": "Ver relatório",
9312
9328
  "diagnosticsCopyFull": "Copiar relatório completo",
9313
9329
  "diagnosticsCopied": "Copiado",
@@ -10122,7 +10138,8 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
10122
10138
  .codexFlat .codexAdvancedBody{padding:0 0 4px}
10123
10139
  .codexFlat .codexAdvancedInline{margin-top:0;border-top:0;padding:0}.codexFlat .codexAdvancedInline>summary{padding:10px 0;font-weight:400}
10124
10140
  .codexFlat .codexSubscriptionSearch>.codexSubscriptionSearchOptions,.codexFlat .codexSubscriptionRuntime,.codexFlat .codexSubscriptionHistory{border-top:0;margin-top:0;padding-top:0}
10125
- .codexFlat .codexSubscriptionSearchOptions{margin:0;padding:0}.codexFlat .codexSubscriptionSearchOptions>summary{padding:10px 0;margin:0}
10141
+ .codexFlat .codexSubscriptionSearchOptions{margin:0;padding:0}
10142
+ .codexFlat .codexSubscriptionSearchOptions>summary{margin:2px 2px 4px;padding:6px 8px}
10126
10143
  .codexFlat .codexSubscriptionCard:has(>.codexSubscriptionAccounts),.codexFlat .codexSubscriptionCard:has(>.codexSubscriptionActions),.codexFlat .codexSubscriptionStorage{padding-block:10px}
10127
10144
  .codexFlat .codexSubscriptionCreditSection{display:block}.codexFlat .codexSubscriptionCreditSection[open]>summary{border-bottom:1px solid var(--dsw-alias-border-l2);margin-bottom:8px}
10128
10145
  .codexFlat .codexSubscriptionStorage{gap:6px}
@@ -11010,6 +11027,9 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11010
11027
  subagentRuntimeInstalled,
11011
11028
  quickQuotaMode: normalizeQuickQuotaMode(value?.[QUICK_QUOTA_MODE_FIELD], value?.[LEGACY_QUICK_QUOTA_FIELD]),
11012
11029
  searchProvider: normalizeSearchProvider(value?.[SEARCH_PROVIDER_FIELD]),
11030
+ webProvidersManagedByDsh: value?.webProvidersManagedByDsh === true,
11031
+ webSearchFallbackProvider: value?.webSearchFallbackProvider,
11032
+ webFetchFallbackProvider: value?.webFetchFallbackProvider,
11013
11033
  fetchProvider: normalizeFetchProvider(value?.[FETCH_PROVIDER_FIELD]),
11014
11034
  fetchRoutingAvailable,
11015
11035
  speedMode: normalizeSpeedMode(value?.[SPEED_MODE_FIELD]),
@@ -11091,6 +11111,9 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11091
11111
  ...readCapabilitySettings(value),
11092
11112
  [QUICK_QUOTA_MODE_FIELD]: normalizeQuickQuotaMode(value?.[QUICK_QUOTA_MODE_FIELD], value?.[LEGACY_QUICK_QUOTA_FIELD]),
11093
11113
  [SEARCH_PROVIDER_FIELD]: normalizeSearchProvider(value?.[SEARCH_PROVIDER_FIELD]),
11114
+ webProvidersManagedByDsh: value?.webProvidersManagedByDsh === true,
11115
+ webSearchFallbackProvider: value?.webSearchFallbackProvider,
11116
+ webFetchFallbackProvider: value?.webFetchFallbackProvider,
11094
11117
  [FETCH_PROVIDER_FIELD]: normalizeFetchProvider(value?.[FETCH_PROVIDER_FIELD]),
11095
11118
  [SPEED_MODE_FIELD]: normalizeSpeedMode(value?.[SPEED_MODE_FIELD]),
11096
11119
  [OUTPUT_VERBOSITY_FIELD]: normalizeOutputVerbosity(value?.[OUTPUT_VERBOSITY_FIELD]),
@@ -11756,7 +11779,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11756
11779
  }
11757
11780
  //#endregion
11758
11781
  //#region src/version.js
11759
- const PACKAGE_VERSION = "3.2.16";
11782
+ const PACKAGE_VERSION = "3.2.17";
11760
11783
  //#endregion
11761
11784
  //#region src/client-recovery.js
11762
11785
  async function recoveryCall(rpc, endpoint, payload = {}, timeoutMs = endpoint === "usage" || endpoint.startsWith("usage/") ? 3e4 : 1e4) {
@@ -14380,7 +14403,7 @@ void main(){
14380
14403
  }
14381
14404
  //#endregion
14382
14405
  //#region src/capability-preferences.jsx
14383
- function CapabilityPreferences({ preference, t, section, disabled = false }) {
14406
+ function CapabilityPreferences({ preference, t, section, disabled = false, showSearchOptions }) {
14384
14407
  const radioId = (0, react.useId)();
14385
14408
  const snapshot = (0, react.useSyncExternalStore)(preference.subscribe, preference.getSnapshot);
14386
14409
  const [domains, setDomains] = (0, react.useState)("");
@@ -14434,7 +14457,7 @@ void main(){
14434
14457
  setInvalid(true);
14435
14458
  }
14436
14459
  };
14437
- if (snapshot.searchProvider === "dsh") return null;
14460
+ if (!(showSearchOptions ?? snapshot.searchProvider !== "dsh")) return null;
14438
14461
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
14439
14462
  className: "codexSubscriptionSearchOptions",
14440
14463
  children: [
@@ -17002,12 +17025,6 @@ void main(){
17002
17025
  const [removing, setRemoving] = (0, react.useState)();
17003
17026
  const alive = (0, react.useRef)(false);
17004
17027
  const on = snapshot.remoteControl === "on";
17005
- const read = async () => {
17006
- try {
17007
- const result = await rpc.call(CHANNEL, "remote/status", {});
17008
- if (alive.current && result.ok) setState(result.value);
17009
- } catch {}
17010
- };
17011
17028
  const readClients = async () => {
17012
17029
  try {
17013
17030
  const result = await rpc.call(CHANNEL, "remote/clients", {});
@@ -17065,7 +17082,10 @@ void main(){
17065
17082
  if (!active) return void 0;
17066
17083
  let stopped = false, timer;
17067
17084
  const poll = async () => {
17068
- await read();
17085
+ try {
17086
+ const result = await rpc.call(CHANNEL, "remote/status", {});
17087
+ if (!stopped && result.ok) setState(result.value);
17088
+ } catch {}
17069
17089
  if (!stopped) timer = setTimeout(poll, 4e3);
17070
17090
  };
17071
17091
  poll();
@@ -17124,7 +17144,6 @@ void main(){
17124
17144
  }
17125
17145
  setPairing(result.value);
17126
17146
  setNow(Date.now());
17127
- read();
17128
17147
  } catch {
17129
17148
  if (alive.current) setFailed(true);
17130
17149
  } finally {
@@ -17134,6 +17153,7 @@ void main(){
17134
17153
  const expired = pairing && pairing.expiresAt <= now;
17135
17154
  const minutes = pairing ? Math.max(0, Math.ceil((pairing.expiresAt - now) / 6e4)) : 0;
17136
17155
  const status = state?.status ?? "connecting";
17156
+ const connectedPhones = status === "connected" ? state?.phones ?? 0 : 0;
17137
17157
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
17138
17158
  className: "codexSubscriptionCard codexSubscriptionPreferencesCard",
17139
17159
  "aria-label": t("remoteTitle"),
@@ -17164,9 +17184,9 @@ void main(){
17164
17184
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
17165
17185
  role: "status",
17166
17186
  children: [
17167
- status === "connected" && state?.phones > 0 ? t("remotePhones").replace("{count}", String(state.phones)) : t(STATUS_KEYS[status] ?? "remoteConnecting"),
17168
- status === "error" && state?.lastError ? ` · ${state.lastError}` : "",
17169
- status !== "connected" && state?.phones > 0 ? ` · ${t("remotePhones").replace("{count}", String(state.phones))}` : ""
17187
+ t(STATUS_KEYS[status] ?? "remoteConnecting"),
17188
+ connectedPhones > 0 ? ` · ${t("remotePhones").replace("{count}", String(connectedPhones))}` : null,
17189
+ status === "error" && state?.lastError ? ` · ${state.lastError}` : null
17170
17190
  ]
17171
17191
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
17172
17192
  type: "button",
@@ -17178,6 +17198,10 @@ void main(){
17178
17198
  children: t(pairing ? "remotePairAgain" : "remotePair")
17179
17199
  })]
17180
17200
  }),
17201
+ status === "connected" && connectedPhones === 0 && clients?.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
17202
+ className: "codexSubscriptionHelp",
17203
+ children: t("remoteOpenPairedHost")
17204
+ }) : null,
17181
17205
  status === "waiting" && state?.lastError === "conflict" && state?.reconnects >= 6 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
17182
17206
  role: "status",
17183
17207
  className: "codexSubscriptionHelp",
@@ -17352,12 +17376,14 @@ void main(){
17352
17376
  //#region src/client-diagnostics.jsx
17353
17377
  function DiagnosticsCard({ rpc, t, diagnostics }) {
17354
17378
  const [report, setReport] = (0, react.useState)();
17379
+ const [download, setDownload] = (0, react.useState)();
17355
17380
  const [busy, setBusy] = (0, react.useState)(false);
17356
17381
  const [copied, setCopied] = (0, react.useState)(false);
17357
17382
  const [copyError, setCopyError] = (0, react.useState)(false);
17358
17383
  const load = () => {
17359
17384
  setBusy(true);
17360
17385
  setReport(void 0);
17386
+ setDownload(void 0);
17361
17387
  setCopied(false);
17362
17388
  setCopyError(false);
17363
17389
  Promise.allSettled([recoveryCall(rpc, "diagnostics"), Promise.resolve().then(() => diagnostics?.collect())]).then(([server, client]) => {
@@ -17369,6 +17395,12 @@ void main(){
17369
17395
  }).finally(() => setBusy(false));
17370
17396
  };
17371
17397
  const text = report === void 0 ? void 0 : JSON.stringify(report, null, 2);
17398
+ (0, react.useEffect)(() => {
17399
+ if (text === void 0) return;
17400
+ const url = URL.createObjectURL(new Blob([text], { type: "application/json" }));
17401
+ setDownload(url);
17402
+ return () => URL.revokeObjectURL(url);
17403
+ }, [text]);
17372
17404
  const copy = () => {
17373
17405
  setCopyError(false);
17374
17406
  Promise.resolve().then(() => navigator.clipboard.writeText(text)).then(() => setCopied(true)).catch(() => setCopyError(true));
@@ -17388,18 +17420,23 @@ void main(){
17388
17420
  className: "codexSubscriptionActions",
17389
17421
  children: [
17390
17422
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
17391
- type: "button",
17392
17423
  variant: "outline",
17393
17424
  disabled: busy,
17394
17425
  onClick: load,
17395
17426
  children: busy ? t("diagnosticsLoading") : t("diagnosticsLoad")
17396
17427
  }),
17397
- text === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
17398
- type: "button",
17428
+ text !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
17399
17429
  variant: "outline",
17400
17430
  onClick: copy,
17401
17431
  children: copied ? t("diagnosticsCopied") : t("diagnosticsCopy")
17402
17432
  }),
17433
+ download && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
17434
+ className: "dcsButton",
17435
+ "data-variant": "outline",
17436
+ href: download,
17437
+ download: "codex-subscription-diagnostics.json",
17438
+ children: t("diagnosticsDownload")
17439
+ }),
17403
17440
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
17404
17441
  className: "codexSubscriptionLink",
17405
17442
  href: SUPPORT_ISSUE_URL,
@@ -17541,6 +17578,135 @@ void main(){
17541
17578
  });
17542
17579
  }
17543
17580
  //#endregion
17581
+ //#region src/client-web-provider-settings.jsx
17582
+ const empty = Object.freeze({});
17583
+ const idle = () => () => {};
17584
+ const snapshot = () => empty;
17585
+ const nativeTitles = {
17586
+ "deepseek-search-api": "DeepSeek Search API",
17587
+ "deepseek-official": "DeepSeek",
17588
+ "deepseek-fetch-api": "DeepSeek Fetch API",
17589
+ http: "HTTP",
17590
+ "codex-subscription": "Codex Subscription",
17591
+ "codex-subscription-auto": "Codex Subscription (Auto)",
17592
+ "codex-subscription-dsh": "DSH (Codex Subscription)"
17593
+ };
17594
+ const webProviderTitle = (id) => nativeTitles[id] ?? id;
17595
+ function useWebProviderForm(ctx) {
17596
+ return useProviderSnapshot(ctx?.get("configForms")?.get("web"));
17597
+ }
17598
+ function useProviderSnapshot(form) {
17599
+ return (0, react.useSyncExternalStore)(form ? (listener) => form.subscribe(listener) : idle, form ? () => form.getSnapshot() : snapshot);
17600
+ }
17601
+ function WebProviderSettings({ ctx, t, preference }) {
17602
+ const radioId = (0, react.useId)();
17603
+ const form = ctx?.get("configForms")?.get("web");
17604
+ const section = useProviderSnapshot(form);
17605
+ const subscription = useProviderSnapshot(ctx?.get("configForms")?.get("codex-subscription"));
17606
+ const preferences = preference.getSnapshot();
17607
+ const [providers, setProviders] = (0, react.useState)();
17608
+ const [failed, setFailed] = (0, react.useState)(false);
17609
+ const [saving, setSaving] = (0, react.useState)(false);
17610
+ (0, react.useEffect)(() => {
17611
+ if (!form) return;
17612
+ return ctx.inject(["remote.web"], (scope) => scope.effect(() => {
17613
+ const remote = scope.get("remote");
17614
+ let generation = 0;
17615
+ const load = async () => {
17616
+ const current = ++generation;
17617
+ const result = await remote.web.listProviders().catch(() => void 0);
17618
+ if (current === generation) setProviders(result?.ok ? result.value : void 0);
17619
+ };
17620
+ const off = remote.$on("web/providers-changed", load);
17621
+ const offReset = scope.on("connection/reset", load);
17622
+ load();
17623
+ return () => {
17624
+ generation++;
17625
+ off();
17626
+ offReset();
17627
+ };
17628
+ }));
17629
+ }, [ctx, form]);
17630
+ const change = async (field, value) => {
17631
+ setSaving(true);
17632
+ setFailed(false);
17633
+ try {
17634
+ const path = [field];
17635
+ const op = !value || value === section.base?.[field] ? {
17636
+ op: "unset",
17637
+ path
17638
+ } : {
17639
+ op: "set",
17640
+ path,
17641
+ value
17642
+ };
17643
+ setFailed(!await form.mutate([op], section.revision));
17644
+ } catch {
17645
+ setFailed(true);
17646
+ } finally {
17647
+ setSaving(false);
17648
+ }
17649
+ };
17650
+ const row = (capability, label, ids, selected) => {
17651
+ const field = capability + "Provider";
17652
+ const id = section.value?.[field];
17653
+ const providerName = providers?.[capability]?.find((provider) => provider.id === id)?.title ?? webProviderTitle(id);
17654
+ const showProvider = selected === "dsh" && id && id !== "codex-subscription-dsh";
17655
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17656
+ className: "codexSubscriptionPreference",
17657
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17658
+ className: "codexSubscriptionPreferenceCopy",
17659
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsLabel, {
17660
+ description: t(capability === "search" ? `search${{
17661
+ auto: "Auto",
17662
+ codex: "Codex",
17663
+ dsh: "Dsh"
17664
+ }[selected]}Hint` : selected === "codex" ? "fetchCodexHint" : "fetchDshHint"),
17665
+ children: label
17666
+ }), section.status === "ready" && showProvider ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, { children: providerName }) : null]
17667
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17668
+ className: "codexSubscriptionSearchChoices codexSubscriptionQuotaModes",
17669
+ role: "radiogroup",
17670
+ "aria-label": label,
17671
+ "aria-busy": saving || void 0,
17672
+ children: Object.entries(ids).map(([mode, target]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
17673
+ className: "codexSubscriptionQuotaMode",
17674
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
17675
+ type: "radio",
17676
+ name: `${radioId}-${field}`,
17677
+ checked: section.status === "ready" && selected === mode,
17678
+ disabled: section.status !== "ready" || !section.writable || saving,
17679
+ onChange: () => {
17680
+ change(field, target);
17681
+ }
17682
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: mode === "auto" ? t("searchAuto") : mode === "codex" ? "Codex" : "DSH" })]
17683
+ }, mode))
17684
+ })]
17685
+ });
17686
+ };
17687
+ const search = section.value?.searchProvider;
17688
+ const fetch = section.value?.fetchProvider;
17689
+ const baseFetch = section.base?.fetchProvider;
17690
+ const nativeSearch = subscription.user?.webSearchFallbackProvider ?? preferences.webSearchFallbackProvider;
17691
+ const nativeFetch = subscription.user?.webFetchFallbackProvider ?? preferences.webFetchFallbackProvider;
17692
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
17693
+ row("search", t("searchTitle"), {
17694
+ auto: "codex-subscription-auto",
17695
+ dsh: nativeSearch ?? "codex-subscription-dsh",
17696
+ codex: "codex-subscription"
17697
+ }, search === "codex-subscription-auto" ? "auto" : search === "codex-subscription" ? "codex" : "dsh"),
17698
+ row("fetch", t("fetchTitle"), {
17699
+ dsh: nativeFetch ?? (baseFetch === "codex-subscription-fetch" ? "http" : baseFetch),
17700
+ codex: "codex-subscription-fetch"
17701
+ }, fetch === "codex-subscription-fetch" ? "codex" : "dsh"),
17702
+ failed ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
17703
+ className: "codexSubscriptionError",
17704
+ role: "alert",
17705
+ children: t("preferenceFailed")
17706
+ }) : null
17707
+ ] });
17708
+ }
17709
+ //#endregion
17544
17710
  //#region src/context-draft-state.js
17545
17711
  const hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value ?? {}, key);
17546
17712
  /**
@@ -17638,9 +17804,10 @@ void main(){
17638
17804
  })]
17639
17805
  });
17640
17806
  }
17641
- function SearchProviderPreference({ preference, t }) {
17807
+ function SearchProviderPreference({ preference, t, webSettingsContext }) {
17642
17808
  const radioId = (0, react.useId)();
17643
17809
  const snapshot = usePreferenceSnapshot(preference);
17810
+ const web = useWebProviderForm(webSettingsContext);
17644
17811
  const writable = snapshot.status === "ready" && snapshot.writable === true;
17645
17812
  const choice = (value, label) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
17646
17813
  className: "codexSubscriptionQuotaMode",
@@ -17654,6 +17821,20 @@ void main(){
17654
17821
  }
17655
17822
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label })]
17656
17823
  });
17824
+ const hint = snapshot.searchProvider === "dsh" ? "searchDshHint" : snapshot.searchProvider === "codex" ? "searchCodexHint" : "searchAutoHint";
17825
+ if (snapshot.webProvidersManagedByDsh) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17826
+ className: "codexSubscriptionSearch",
17827
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(WebProviderSettings, {
17828
+ ctx: webSettingsContext,
17829
+ t,
17830
+ preference
17831
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CapabilityPreferences, {
17832
+ preference,
17833
+ t,
17834
+ section: "search",
17835
+ showSearchOptions: ["codex-subscription", "codex-subscription-auto"].includes(web.value?.searchProvider)
17836
+ })]
17837
+ });
17657
17838
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17658
17839
  className: "codexSubscriptionSearch",
17659
17840
  children: [
@@ -17662,7 +17843,7 @@ void main(){
17662
17843
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17663
17844
  className: "codexSubscriptionPreferenceCopy",
17664
17845
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsLabel, {
17665
- description: t(snapshot.searchProvider === "dsh" ? "searchDshHint" : snapshot.searchProvider === "codex" ? "searchCodexHint" : "searchAutoHint"),
17846
+ description: t(hint),
17666
17847
  children: t("searchTitle")
17667
17848
  }), snapshot.status === "ready" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, { children: t(`searchState_${snapshot.searchProvider}`) }) : null]
17668
17849
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -18232,8 +18413,10 @@ void main(){
18232
18413
  });
18233
18414
  }
18234
18415
  /** The first thing a new user sees: every feature, what it does, and whether it is on. Options live on the page the arrow leads to. */
18235
- function FeatureOverview({ preference, t, go }) {
18416
+ function FeatureOverview({ preference, t, go, webSettingsContext }) {
18236
18417
  const snapshot = usePreferenceSnapshot(preference);
18418
+ const web = useWebProviderForm(webSettingsContext);
18419
+ const searchStatus = snapshot.webProvidersManagedByDsh ? web.status === "ready" ? webProviderTitle(web.value?.searchProvider) ?? t("searchAuto") : void 0 : `${t(`searchSource_${snapshot.searchProvider}`)} · ${t(`searchMode_${snapshot.searchMode}`)}`;
18237
18420
  const writable = ready(snapshot);
18238
18421
  const set = (patch) => {
18239
18422
  preference.set(patch);
@@ -18248,7 +18431,7 @@ void main(){
18248
18431
  t,
18249
18432
  title: t("featureSearchTitle"),
18250
18433
  summary: t("featureSearchSummary"),
18251
- status: `${t(`searchSource_${snapshot.searchProvider}`)} · ${t(`searchMode_${snapshot.searchMode}`)}`,
18434
+ status: searchStatus,
18252
18435
  onMore: () => go("tools")
18253
18436
  }),
18254
18437
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FeatureRow, {
@@ -18660,7 +18843,7 @@ void main(){
18660
18843
  model !== "" && !selected ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, { children: t("subagentDefaultUnavailable") }) : null
18661
18844
  ] });
18662
18845
  }
18663
- function ToolsPage({ preference, rpc, t, active = true, openSubagentBundle }) {
18846
+ function ToolsPage({ preference, rpc, t, active = true, openSubagentBundle, webSettingsContext }) {
18664
18847
  const snapshot = usePreferenceSnapshot(preference);
18665
18848
  const writable = ready(snapshot);
18666
18849
  const others = snapshot.otherModels !== "off";
@@ -18689,7 +18872,8 @@ void main(){
18689
18872
  "aria-label": t("searchSectionTitle"),
18690
18873
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchProviderPreference, {
18691
18874
  preference,
18692
- t
18875
+ t,
18876
+ webSettingsContext
18693
18877
  })
18694
18878
  }),
18695
18879
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
@@ -20515,7 +20699,7 @@ void main(){
20515
20699
  function ProjectAction({ subject, t }) {
20516
20700
  return subject?.kind === "bundle" && subject.pkg.name === "dsh-codex-subscription" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProjectLink, { t }) : null;
20517
20701
  }
20518
- function CodexSection({ preference, rpc, accountStatus, t, diagnostics, defaultModel, embedded = false, close, openSubagentBundle }) {
20702
+ function CodexSection({ preference, rpc, accountStatus, t, diagnostics, defaultModel, embedded = false, close, openSubagentBundle, webSettingsContext }) {
20519
20703
  const [tab, setTab] = (0, react.useState)("start");
20520
20704
  const [visited, setVisited] = (0, react.useState)(() => /* @__PURE__ */ new Set(["start"]));
20521
20705
  const selectTab = (value) => {
@@ -20619,7 +20803,8 @@ void main(){
20619
20803
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FeatureOverview, {
20620
20804
  preference,
20621
20805
  t,
20622
- go: selectTab
20806
+ go: selectTab,
20807
+ webSettingsContext
20623
20808
  })
20624
20809
  ]
20625
20810
  }),
@@ -20646,6 +20831,7 @@ void main(){
20646
20831
  rpc,
20647
20832
  t,
20648
20833
  active: tab === "tools",
20834
+ webSettingsContext,
20649
20835
  openSubagentBundle: openSubagentBundle && (() => {
20650
20836
  openSubagentBundle();
20651
20837
  if (!embedded) close?.();
@@ -21540,7 +21726,8 @@ void main(){
21540
21726
  accountStatus,
21541
21727
  t,
21542
21728
  diagnostics,
21543
- defaultModel
21729
+ defaultModel,
21730
+ webSettingsContext: ctx
21544
21731
  }, CodexSection, ProjectAction);
21545
21732
  const sessions = ctx.get("sessions");
21546
21733
  const rootDirectories = ctx.get("modelDirectories");