dsh-codex-subscription 3.1.7 → 3.1.8

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/README.en.md CHANGED
@@ -47,7 +47,7 @@ Web search and webpage reading sources, ChatGPT connectors and official Codex in
47
47
 
48
48
  ## Prepare DSH
49
49
 
50
- Verified against DSH `0.2.1-rc.3` (the `next` channel), with `0.2.1-rc.2` still supported; the minimum supported version is `0.1.7-rc.2`. Please upgrade older DSH releases first.
50
+ Verified against DSH `0.2.1-rc.4` (the `next` channel), with `0.2.1-rc.3` and `0.2.1-rc.2` still supported; the minimum supported version is `0.1.7-rc.2`. Please upgrade older DSH releases first.
51
51
 
52
52
  This plugin supports the latest DeepSeek Harness release recorded in its package metadata and requires a ChatGPT account that currently has Codex access.
53
53
 
@@ -68,7 +68,7 @@ This plugin supports the latest DeepSeek Harness release recorded in its package
68
68
  2. Paste this package name, with its version, into the **Package name or address** field:
69
69
 
70
70
  ```text
71
- dsh-codex-subscription@3.1.7
71
+ dsh-codex-subscription@3.1.8
72
72
  ```
73
73
 
74
74
  3. Click **Install** and wait for completion. Follow the page instructions; save your work before restarting if requested.
@@ -85,7 +85,7 @@ Why the version is included: DSH's plugin page only installs versions that are a
85
85
  <summary>Terminal installation (with an existing dsh command)</summary>
86
86
 
87
87
  ```sh
88
- dsh plugin --profile web add dsh-codex-subscription@3.1.7
88
+ dsh plugin --profile web add dsh-codex-subscription@3.1.8
89
89
  ```
90
90
 
91
91
  Follow the restart instructions, then sign in under **Settings → Codex**. Both the Plugins page and the terminal use DSH's installation management.
@@ -98,7 +98,7 @@ Follow the restart instructions, then sign in under **Settings → Codex**. Both
98
98
  After signing in and selecting a Codex model in Web, install the same plugin in the Headless profile:
99
99
 
100
100
  ```sh
101
- dsh plugin --profile headless add dsh-codex-subscription@3.1.7
101
+ dsh plugin --profile headless add dsh-codex-subscription@3.1.8
102
102
  dsh --profile headless "Reply with only the word: ok"
103
103
  ```
104
104
 
@@ -136,7 +136,7 @@ Open **Settings → Codex** to manage accounts and preferences. Screenshots and
136
136
  | Settings tab | What it controls |
137
137
  | --- | --- |
138
138
  | **Start** | Sign-in and accounts, a switch for every feature, subscription quota, quota display and alerts |
139
- | **Models** | Default model and model list, answer style; the folded Advanced group has context length, retry, connection mode, cloud compaction and the review model |
139
+ | **Models** | Default model, default reasoning effort and model list, answer style; the folded Advanced group has context length, retry, connection mode, cloud compaction and the review model |
140
140
  | **Web & tools** | The master switch for other models, search source, ChatGPT connectors, official Codex subtasks |
141
141
  | **Create** | Image generation, editing, @image in the composer, image viewer, sketch board and agent drawing |
142
142
  | **Phone & more** | Phone remote control, experimental voice calls, local cache, support diagnostics |
@@ -243,8 +243,6 @@ This is a third-party compatibility layer using OpenAI's remote connection servi
243
243
 
244
244
  <p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/ui-remote-en-dark.png"><img src="docs/assets/ui-remote-en-light.png" width="560" alt="Phone remote control in settings: the switch, pairing QR code and manual code, paired phones"></picture></p>
245
245
 
246
- <p align="center"><sub>The screenshot’s QR code hides a little Easter egg. To pair your phone, use the code generated in DSH settings.</sub></p>
247
-
248
246
  </details>
249
247
 
250
248
  ## All features
@@ -261,6 +259,7 @@ Model access and quota depend on your account.
261
259
  | **Model catalog sync** | Read available models and reasoning levels from your account, with manual refresh; the last successful catalog is stored locally per account and remains available during the background refresh after restart, with a 24-hour lifetime; models marked for retirement show their retirement date next to the model name, without automatically switching your selection | New models appear when your account offers them; the account catalog is the only source, so no models are shown when signed out or when neither a remote read nor a valid cache is available |
262
260
  | **Model list** | Show or hide individual models in the composer picker on the Models page; the picker keeps DSH's own model labels (such as the new-model badge) | Display only; selected models and requests still work |
263
261
  | **Default model** | Choose the model a new conversation opens with on the Models page | Writes the DSH default model setting, the same one a model switch inside a chat writes; unset it to follow the DSH default |
262
+ | **Default reasoning effort** | Choose a default level for subscription models on the Models page; Model default follows each model's official catalog recommendation | Manual choices take priority. Unsupported levels fall back to the model's valid default; existing manual conversation choices are preserved |
264
263
  | **Reasoning levels** | Choose supported reasoning effort in the composer | Levels vary by model |
265
264
  | **Speed tiers** | Switch supported models between Standard and Fast; Ultrafast (Beta) too when the account catalog offers it, with a lightning indicator | Standard by default; Fast and Ultrafast increase usage, and Ultrafast is Pro 500 only today |
266
265
  | **Response verbosity** | Request short, medium, or detailed responses | Follows the model default unless changed |
@@ -286,7 +285,7 @@ Model access and quota depend on your account.
286
285
  | **Usage overview** | In the quota card, see lifetime tokens, busiest day, streaks, most used reasoning level and a half-year daily heatmap | From the official usage statistics; hidden when the account has none |
287
286
  | **Credits and reset cards** | View extra Credits, spending caps, and available reset cards | Shown when returned for your account |
288
287
  | **Composer quota** | See remaining quota as a percentage or progress bar while chatting | Off by default; choose your display mode |
289
- | **Runway estimate** | Estimate remaining time from recent usage | Beta; optional estimate, not a guarantee |
288
+ | **Runway estimate** | Hover over or click the composer quota to see when recent usage would exhaust it | Beta; optional estimate, not a guarantee |
290
289
  | **Quota alerts** | Use fixed, early, or custom short / long-window thresholds | 20% remaining by default; can be disabled |
291
290
  | **Redeem reset cards** | Use an available reset card after confirmation | Confirmation and waiting safeguards; server decides the result |
292
291
  | **Retry after reset** | Wait for a confirmed short-window reset before continuing | Off by default; waiting can be stopped |
@@ -357,7 +356,7 @@ Find this plugin on the DSH **Plugins** page and use its update or uninstall act
357
356
  <summary>Terminal commands</summary>
358
357
 
359
358
  ```sh
360
- dsh plugin --profile web update dsh-codex-subscription@3.1.7
359
+ dsh plugin --profile web update dsh-codex-subscription@3.1.8
361
360
  ```
362
361
 
363
362
  Run only when you want to uninstall:
package/README.md CHANGED
@@ -47,7 +47,7 @@
47
47
 
48
48
  ## 准备 DSH
49
49
 
50
- 已验证兼容 DSH `0.2.1-rc.3`(`next` 通道),继续支持 `0.2.1-rc.2`,最低支持 `0.1.7-rc.2`;更早的 DSH 请先升级。
50
+ 已验证兼容 DSH `0.2.1-rc.4`(`next` 通道),继续支持 `0.2.1-rc.3` 和 `0.2.1-rc.2`,最低支持 `0.1.7-rc.2`;更早的 DSH 请先升级。
51
51
 
52
52
  本插件支持软件包元数据中记录的最新版 DeepSeek Harness,并需要一个当前具有 Codex 使用资格的 ChatGPT 账户。
53
53
 
@@ -68,7 +68,7 @@
68
68
  2. 在 **包名或地址** 输入框中粘贴下面的包名(已带版本号):
69
69
 
70
70
  ```text
71
- dsh-codex-subscription@3.1.7
71
+ dsh-codex-subscription@3.1.8
72
72
  ```
73
73
 
74
74
  3. 点击 **安装**,等待安装完成;按页面提示操作,需要重启时先保存工作。
@@ -85,7 +85,7 @@
85
85
  <summary>终端安装(已能运行 dsh 命令)</summary>
86
86
 
87
87
  ```sh
88
- dsh plugin --profile web add dsh-codex-subscription@3.1.7
88
+ dsh plugin --profile web add dsh-codex-subscription@3.1.8
89
89
  ```
90
90
 
91
91
  安装完成后按提示重启 DSH,再到 **设置 → Codex 订阅** 登录。插件页面和终端均由 DSH 管理安装。
@@ -98,7 +98,7 @@ dsh plugin --profile web add dsh-codex-subscription@3.1.7
98
98
  先在 Web 中完成登录并选择一次 Codex 模型,再把同一个插件安装到 Headless profile:
99
99
 
100
100
  ```sh
101
- dsh plugin --profile headless add dsh-codex-subscription@3.1.7
101
+ dsh plugin --profile headless add dsh-codex-subscription@3.1.8
102
102
  dsh --profile headless "只回复:ok"
103
103
  ```
104
104
 
@@ -136,7 +136,7 @@ dsh --profile headless "只回复:ok"
136
136
  | 设置页 | 在这里做什么 |
137
137
  | --- | --- |
138
138
  | **开始** | 登录与切换账号、各功能开关一览、订阅额度、额度显示和提醒 |
139
- | **模型** | 默认模型与模型列表、回答风格;折叠的“高级”里有上下文长度、重试、连接方式、云端压缩、审查模型 |
139
+ | **模型** | 默认模型、默认推理等级与模型列表、回答风格;折叠的“高级”里有上下文长度、重试、连接方式、云端压缩、审查模型 |
140
140
  | **联网与工具** | 其他模型能否用订阅功能的总开关,搜索来源、ChatGPT 连接器、官方 Codex 子任务 |
141
141
  | **创作** | 图片生成、编辑、输入框 @生图、图片查看器,草图画板和 Agent 绘图 |
142
142
  | **手机与更多** | 手机远程控制、语音对话(实验性)、本机缓存、支持诊断 |
@@ -243,8 +243,6 @@ Agent 先在画板绘制可编辑草图,再以该草图为参考调用订阅
243
243
 
244
244
  <p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/ui-remote-zh-dark.png"><img src="docs/assets/ui-remote-zh-light.png" width="560" alt="设置里的手机远程控制:开关、配对二维码和手动码、已配对的手机"></picture></p>
245
245
 
246
- <p align="center"><sub>截图中的二维码藏着一个小彩蛋;实际配对请使用 DSH 设置里生成的二维码。</sub></p>
247
-
248
246
  </details>
249
247
 
250
248
  ## 全部功能
@@ -261,6 +259,7 @@ Agent 先在画板绘制可编辑草图,再以该草图为参考调用订阅
261
259
  | **模型目录同步** | 自动读取账号可用模型与推理档位,支持手动刷新;上次成功读取的目录会按账号保存在本地,重启时可在后台刷新期间继续使用,缓存有效期为 24 小时;目录标注退役的模型会在模型名称旁显示退役日期,不会自动切换你的选择 | 新型号以账号目录开放情况为准;模型只来自账号目录,未登录或读取失败且没有有效缓存时不显示任何模型,也不使用内置列表 |
262
260
  | **模型列表** | 在“模型”页中逐个显示或隐藏输入框中的模型;模型选择器沿用 DSH 官方的模型标识(如新模型徽章) | 仅影响列表显示;已选模型和请求不受影响 |
263
261
  | **默认模型** | 在“模型”页里选择每次新建会话默认使用的模型 | 写入 DSH 的默认模型设置,与在对话里切换模型是同一处;未设置时跟随 DSH 默认 |
262
+ | **默认推理等级** | 在“模型”页统一选择订阅模型的默认档位;默认跟随各模型的官方目录推荐值 | 手动选档优先;模型不支持所选档位时使用该模型的合法默认值;不更改已有会话的手动选择 |
264
263
  | **推理等级** | 在输入框选择模型支持的推理档位 | 档位随模型变化 |
265
264
  | **速度档位** | 在支持的模型上切换标准 / Fast;账号目录提供时还有 Ultrafast(Beta),输入框显示闪电标识 | 默认标准;Fast 和 Ultrafast 会增加用量消耗,Ultrafast 目前仅 Pro 500 |
266
265
  | **输出详略** | 选择简短、适中或详细的回答偏好 | 默认跟随模型 |
@@ -286,7 +285,7 @@ Agent 先在画板绘制可编辑草图,再以该草图为参考调用订阅
286
285
  | **使用概览** | 在额度卡片里查看累计 token、单日最高、连续使用天数、最常用推理档,以及最近半年的每日用量热力图 | 来自官方使用统计;账号没有该统计时不显示 |
287
286
  | **Credits 与重置卡** | 查看额外 Credits、消费上限和可用重置卡 | 账号返回对应数据时显示 |
288
287
  | **输入框额度** | 不离开会话即可查看百分比或进度条 | 默认关闭,可选显示方式 |
289
- | **续航预测** | 根据最近使用速度估算剩余可用时长 | Beta;可选,不是保证值 |
288
+ | **续航预测** | 悬浮或点击输入框额度,查看按最近用量估算的用完时间 | Beta;可选,不是保证值 |
290
289
  | **额度提醒** | 使用固定阈值、提前提醒,或分别设置短 / 长周期阈值 | 默认剩余 20% 提醒,可关闭 |
291
290
  | **使用重置卡** | 在确认后主动使用服务端提供的重置卡 | 二次确认与等待保护,由服务端判定结果 |
292
291
  | **重置后重试** | 等待已确认的短时额度重置,再继续请求 | 默认关闭;等待期间可停止 |
@@ -357,7 +356,7 @@ Agent 先在画板绘制可编辑草图,再以该草图为参考调用订阅
357
356
  <summary>终端方式</summary>
358
357
 
359
358
  ```sh
360
- dsh plugin --profile web update dsh-codex-subscription@3.1.7
359
+ dsh plugin --profile web update dsh-codex-subscription@3.1.8
361
360
  ```
362
361
 
363
362
  仅在需要卸载时运行:
@@ -1,12 +1,13 @@
1
1
  {
2
- "latestTested": "0.2.1-rc.3",
2
+ "latestTested": "0.2.1-rc.4",
3
3
  "supported": [
4
4
  "0.1.7-rc.2",
5
5
  "0.2.0-rc.1",
6
6
  "0.2.0-rc.2",
7
7
  "0.2.1-rc.1",
8
8
  "0.2.1-rc.2",
9
- "0.2.1-rc.3"
9
+ "0.2.1-rc.3",
10
+ "0.2.1-rc.4"
10
11
  ],
11
12
  "previews": [
12
13
  "0.2.1-alpha.1",
package/lib/client.js CHANGED
@@ -7149,6 +7149,7 @@ window.__ModuleLoader__.load({
7149
7149
  const zh = {
7150
7150
  voiceMediaHint: "窗口不支持 WebRTC 时,可在浏览器中继续同一会话。音色试听不受影响,仍使用当前订阅,无需 API Key。",
7151
7151
  voiceBrowserContinue: "在浏览器继续此会话",
7152
+ voiceBrowserCall: "在浏览器继续语音通话",
7152
7153
  voiceBrowserCopy: "复制会话链接",
7153
7154
  voiceBrowserCopied: "已复制",
7154
7155
  voiceBrowserCopyFailed: "复制失败,请手动复制链接",
@@ -7227,8 +7228,8 @@ window.__ModuleLoader__.load({
7227
7228
  storageTitle: "存储与缓存",
7228
7229
  storageForecast: "额度预测缓存",
7229
7230
  storageClear: "清除预测历史",
7230
- storageHint: "只清理本地预测历史;原图、草稿、登录信息和共享依赖不受影响。子任务组件在“联网与工具”中管理。",
7231
- storageConfirm: "清除所有已登录账号的本地预测历史后,需要重新积累采样。服务端额度不变,后续查询会重新生成缓存。",
7231
+ storageHint: "仅清除本地预测历史,不影响订阅额度。",
7232
+ storageConfirm: "清除所有已登录账号的本地预测历史?预测需重新积累采样;订阅额度、图片、草稿和登录信息不受影响。",
7232
7233
  storageFailed: "未能读取或清除预测缓存,请重试。",
7233
7234
  runtimeIncompatible: "检测到不兼容的 Codex 子任务组件,请卸载后重启,再安装受支持版本。",
7234
7235
  runtimeManagedElsewhere: "此组件由宿主或其他依赖管理,请在 DSH 插件管理中查看;这里不能直接卸载。",
@@ -7288,6 +7289,16 @@ window.__ModuleLoader__.load({
7288
7289
  connectors_read: "只读",
7289
7290
  connectors_ask: "询问后写入",
7290
7291
  connectors_write: "直接写入",
7292
+ defaultReasoningEffort: "默认推理等级",
7293
+ defaultReasoningEffortHint: "未手动选档时使用;模型不支持时跟随该模型默认值。",
7294
+ defaultReasoningEffort_auto: "模型默认",
7295
+ defaultReasoningEffort_off: "关闭推理",
7296
+ defaultReasoningEffort_minimal: "极低",
7297
+ defaultReasoningEffort_low: "低",
7298
+ defaultReasoningEffort_medium: "中",
7299
+ defaultReasoningEffort_high: "高",
7300
+ defaultReasoningEffort_xhigh: "超高",
7301
+ defaultReasoningEffort_max: "最高",
7291
7302
  reasoningSummary: "推理摘要",
7292
7303
  reasoningSummaryHint: "让模型在会话的“思考”部分给出推理摘要。自动由模型决定;简洁更短;详细更完整;关闭则不要摘要。",
7293
7304
  reasoningCache: "切换推理强度时复用缓存",
@@ -7815,7 +7826,7 @@ window.__ModuleLoader__.load({
7815
7826
  quickQuotaBeta: "Beta",
7816
7827
  autoQuotaRetry: "额度重置后自动重试",
7817
7828
  autoQuotaRetryHint: "开启后,等待已确认的短时额度重置;对话会显示等待原因且可停止,等待期间切换账号会立即重试。",
7818
- quickQuotaForecastHint: "按最近两小时的用量估算何时用完;稳定时显示时间范围,变化后先校准或给粗估。未来用量变化会影响结果,仅供参考。历史保存在本机。",
7829
+ quickQuotaForecastHint: "输入框仅显示剩余额度,悬浮或点击查看预测。按最近两小时用量估算何时用完;未来用量变化会影响结果,仅供参考。历史保存在本机。",
7819
7830
  contextTitle: "上下文窗口",
7820
7831
  contextStandard: "标准",
7821
7832
  contextStandardHint: "使用模型目录默认值;官方 Agent 预设会自动管理上下文。",
@@ -8033,6 +8044,7 @@ window.__ModuleLoader__.load({
8033
8044
  const en = {
8034
8045
  voiceMediaHint: "If this window does not support WebRTC, continue the same conversation in a browser. Voice samples remain available. Your existing subscription is used; no API key is needed.",
8035
8046
  voiceBrowserContinue: "Continue this conversation in a browser",
8047
+ voiceBrowserCall: "Continue voice in a browser",
8036
8048
  voiceBrowserCopy: "Copy conversation link",
8037
8049
  voiceBrowserCopied: "Copied",
8038
8050
  voiceBrowserCopyFailed: "Copy failed; copy the link manually",
@@ -8111,8 +8123,8 @@ window.__ModuleLoader__.load({
8111
8123
  storageTitle: "Storage and cache",
8112
8124
  storageForecast: "Quota forecast cache",
8113
8125
  storageClear: "Clear forecast history",
8114
- storageHint: "Clears local forecast history only; original images, drafts, sign-in data and shared dependencies are untouched. Subtask components are managed under Web & tools.",
8115
- storageConfirm: "This clears local forecast samples for all signed-in accounts. Forecasts will need new samples. Server quotas stay unchanged; subsequent checks recreate the cache.",
8126
+ storageHint: "Clears local forecast history only. Subscription quota is unchanged.",
8127
+ storageConfirm: "Clear local forecast history for all signed-in accounts? Forecasts will need new samples. Subscription quota, images, drafts and sign-in data are unaffected.",
8116
8128
  storageFailed: "Could not read or clear the forecast cache. Try again.",
8117
8129
  runtimeIncompatible: "An incompatible Codex subtask component was found. Uninstall it, restart DSH, then install the supported version.",
8118
8130
  runtimeManagedElsewhere: "This component is managed by the host or another dependency. Check DSH plugin management; it cannot be removed here.",
@@ -8172,6 +8184,16 @@ window.__ModuleLoader__.load({
8172
8184
  connectors_read: "Read-only",
8173
8185
  connectors_ask: "Write after asking",
8174
8186
  connectors_write: "Write directly",
8187
+ defaultReasoningEffort: "Default reasoning effort",
8188
+ defaultReasoningEffortHint: "Used when no effort is selected manually. Unsupported levels fall back to the model default.",
8189
+ defaultReasoningEffort_auto: "Model default",
8190
+ defaultReasoningEffort_off: "Off",
8191
+ defaultReasoningEffort_minimal: "Minimal",
8192
+ defaultReasoningEffort_low: "Low",
8193
+ defaultReasoningEffort_medium: "Medium",
8194
+ defaultReasoningEffort_high: "High",
8195
+ defaultReasoningEffort_xhigh: "Extra high",
8196
+ defaultReasoningEffort_max: "Maximum",
8175
8197
  reasoningSummary: "Reasoning summary",
8176
8198
  reasoningSummaryHint: "Shows a summary of the reasoning in the Thinking section of the conversation. Auto lets the model decide; concise is shorter; detailed is fuller; off asks for none.",
8177
8199
  reasoningCache: "Reuse cache when changing effort",
@@ -8699,7 +8721,7 @@ window.__ModuleLoader__.load({
8699
8721
  quickQuotaBeta: "Beta",
8700
8722
  autoQuotaRetry: "Retry after quota reset",
8701
8723
  autoQuotaRetryHint: "Wait for confirmed short quota resets. The turn shows why it is waiting and can be stopped; switching accounts retries immediately.",
8702
- quickQuotaForecastHint: "Estimates run-out time from recent two-hour usage. Stable readings show a range; changes trigger calibration or a rough estimate. Future usage affects the result. History stays local.",
8724
+ quickQuotaForecastHint: "Shows remaining quota in the composer; hover or click for the forecast. Estimates run-out time from recent two-hour usage. Future usage affects the result. History stays local.",
8703
8725
  contextTitle: "Context window",
8704
8726
  contextStandard: "Standard",
8705
8727
  contextStandardHint: "Use the model catalog default; official agent presets manage context automatically.",
@@ -9222,8 +9244,9 @@ window.__ModuleLoader__.load({
9222
9244
  .codexSubscriptionDiagnostics .codexSubscriptionSectionTitle{display:flex;flex-direction:column;gap:5px}
9223
9245
  .codexSubscriptionRemotePair{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-top:8px}.codexSubscriptionRemoteQr{width:168px;height:168px;flex:none;border-radius:12px;overflow:hidden;background:#fff}.codexSubscriptionRemoteQr svg{display:block;width:100%;height:100%}.codexSubscriptionRemoteCode{margin:6px 0;font:600 20px/28px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.08em;user-select:all}
9224
9246
  .codexSubscriptionStorageMeter{display:flex;flex-direction:column;gap:9px;padding:12px;border-radius:10px;background:var(--dsw-alias-bg-module-platform)}
9225
- .codexSubscriptionStorageMeter>div{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12px;line-height:18px}
9226
- .codexSubscriptionStorageMeter output{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary)}
9247
+ .codexSubscriptionStorageHead{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap}
9248
+ .codexSubscriptionStorageTitle{display:flex;align-items:baseline;gap:6px 12px;flex-wrap:wrap;min-width:0}
9249
+ .codexSubscriptionStorageTitle output{font-size:12px;line-height:18px;font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary)}
9227
9250
  .codexSubscriptionStorageMeter progress{width:100%;height:4px;border:0;border-radius:4px;overflow:hidden;accent-color:var(--dsw-alias-label-secondary)}
9228
9251
  .codexSubscriptionStorageMeter progress::-webkit-progress-bar{background:var(--dsw-alias-border-l2)}
9229
9252
  .codexSubscriptionStorageMeter progress::-webkit-progress-value{background:var(--dsw-alias-label-secondary)}
@@ -9245,6 +9268,7 @@ window.__ModuleLoader__.load({
9245
9268
  .codexVoiceChoice .codexSubscriptionContextTrigger:first-child:not(:last-child){min-width:0;justify-content:center}
9246
9269
  /* The voice button wears the send button's own classes, so its colours, shape and theme are always the send button's. */
9247
9270
  .codexVoiceCall{position:absolute;z-index:2;margin:0}
9271
+ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizing:border-box;text-decoration:none}
9248
9272
  /* DSH's send button is the light info colour at rest and darkens on hover. The voice button is an action in its own right, so it keeps the stronger colour all the time and only deepens a little on hover. */
9249
9273
  .codexVoiceCall:not(:disabled){background:var(--dsw-alias-button-info-hover,#4176e6)!important;filter:none}
9250
9274
  .codexVoiceCall:not(:disabled):hover{filter:brightness(.92)}
@@ -9325,11 +9349,12 @@ window.__ModuleLoader__.load({
9325
9349
  .codexFlat{display:flex;flex-direction:column;gap:0}.codexFlat[hidden]{display:none}
9326
9350
  .codexFlat .codexSubscriptionAdvancedPreferences{gap:0}
9327
9351
  .codexFlat .codexSubscriptionCard,.codexFlat .codexSubscriptionPreferencesCard,.codexFlat .codexImageSettings{border:1px solid var(--dsw-alias-border-l2);background:transparent;box-shadow:none;border-radius:12px;padding:2px 16px;margin:0 0 8px}
9352
+ .codexFlat .codexSubscriptionPreferencesCard,.codexFlat .codexFeatureOverview{gap:0}
9328
9353
  .codexFlat h3,.codexFlat .codexSubscriptionSectionHead h3{margin:10px 0 2px;font-size:14px;font-weight:500;line-height:20px;color:var(--dsw-alias-label-primary)}
9329
9354
  .codexFlat .codexSubscriptionPreference,.codexFlat .codexFeatureRow>.codexFeatureMain{box-sizing:border-box;padding:8px 0;min-height:52px;gap:6px 16px;align-items:center}
9330
9355
  .codexFlat .codexSubscriptionPreference,.codexFlat .codexFeatureRow{border-bottom:1px solid var(--dsw-alias-border-l2)}
9331
9356
  .codexFlat .codexFeatureRow,.codexFlat .codexSubscriptionPreference{border-top:0}
9332
- .codexFlat section>.codexSubscriptionPreference:last-child,.codexFlat section>.codexFeatureRow:last-of-type,.codexFlat section>div:last-child>.codexSubscriptionPreference:last-child,.codexFlat .codexAdvancedBody>.codexSubscriptionPreference:last-child{border-bottom:0}
9357
+ .codexFlat section>.codexSubscriptionPreference:last-child,.codexFlat .codexSubscriptionCard>.codexSubscriptionPreference:last-child,.codexFlat section>.codexFeatureRow:last-of-type,.codexFlat section>div:last-child>.codexSubscriptionPreference:last-child,.codexFlat .codexAdvancedBody>.codexSubscriptionPreference:last-child{border-bottom:0}
9333
9358
  .codexFlat .codexSubscriptionPreferenceLabel,.codexFlat .codexFeatureTitle{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:400;line-height:20px;min-height:20px;color:var(--dsw-alias-label-primary)}
9334
9359
  .codexFlat .codexSubscriptionPreferenceLabel small,.codexFlat .codexFeatureTitle small{line-height:16px;height:16px;display:inline-flex;align-items:center}
9335
9360
  .codexFlat .codexSubscriptionPreferenceHint,.codexFlat .codexFeatureSummary,.codexFlat .codexSubscriptionHintText{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary)}
@@ -9352,7 +9377,9 @@ window.__ModuleLoader__.load({
9352
9377
  .codexFlat .codexSubscriptionSearchOptions{margin:0;padding:0}.codexFlat .codexSubscriptionSearchOptions>summary{padding:10px 0;margin:0}
9353
9378
  .codexFlat .codexSubscriptionCard:has(>.codexSubscriptionAccounts),.codexFlat .codexSubscriptionCard:has(>.codexSubscriptionActions),.codexFlat .codexSubscriptionStorage{padding-block:10px}
9354
9379
  .codexFlat .codexSubscriptionCreditSection{display:block}.codexFlat .codexSubscriptionCreditSection[open]>summary{border-bottom:1px solid var(--dsw-alias-border-l2);margin-bottom:8px}
9355
- .codexFlat .codexSubscriptionStorageMeter{background:transparent;padding:6px 0}
9380
+ .codexFlat .codexSubscriptionStorage{gap:6px}
9381
+ .codexFlat .codexSubscriptionStorageTitle h3{margin:0}
9382
+ .codexFlat .codexSubscriptionStorageMeter{background:transparent;padding:0}
9356
9383
  .codexFlat .codexSubscriptionResetBox{border:0;border-radius:0;padding:0}
9357
9384
  .codexFlat :is(button,summary,a):focus-visible,.codexFlat label:has(:focus-visible){outline:2px solid var(--dsw-alias-border-inverted);outline-offset:2px;box-shadow:none}
9358
9385
  .codexSettingsTabs{position:sticky;top:0;z-index:2;background:var(--dsw-alias-bg-layer-1);border-radius:0;padding:6px 0 0;margin-top:-6px;gap:18px;display:flex;overflow-x:auto;scrollbar-width:none;grid-template-columns:none;border-bottom:1px solid var(--dsw-alias-border-l2);margin-bottom:8px}
@@ -10800,6 +10827,20 @@ window.__ModuleLoader__.load({
10800
10827
  const normalizeVoiceCall = (value) => value === "on" ? "on" : "off";
10801
10828
  const normalizeVoiceVoice = (value) => VOICE_VOICES.includes(value) ? value : "cove";
10802
10829
  const normalizeVoiceLanguage = (value) => VOICE_LANGUAGES.includes(value) ? value : "auto";
10830
+ const DEFAULT_REASONING_EFFORT_FIELD = "defaultReasoningEffort";
10831
+ const DEFAULT_REASONING_EFFORTS = Object.freeze([
10832
+ "auto",
10833
+ "off",
10834
+ "minimal",
10835
+ "low",
10836
+ "medium",
10837
+ "high",
10838
+ "xhigh",
10839
+ "max"
10840
+ ]);
10841
+ const DEFAULT_REASONING_EFFORT = "auto";
10842
+ const normalizeDefaultReasoningEffort = (value) => DEFAULT_REASONING_EFFORTS.includes(value) ? value : DEFAULT_REASONING_EFFORT;
10843
+ const normalizeDefaultReasoningEffortChoice = normalizeDefaultReasoningEffort;
10803
10844
  const REASONING_SUMMARY_FIELD = "reasoningSummary";
10804
10845
  const REASONING_SUMMARIES = Object.freeze([
10805
10846
  "auto",
@@ -10933,6 +10974,11 @@ window.__ModuleLoader__.load({
10933
10974
  default: "on",
10934
10975
  error: "Invalid reasoning cache preference"
10935
10976
  },
10977
+ [DEFAULT_REASONING_EFFORT_FIELD]: {
10978
+ choices: DEFAULT_REASONING_EFFORTS,
10979
+ default: DEFAULT_REASONING_EFFORT,
10980
+ error: "Invalid default reasoning effort"
10981
+ },
10936
10982
  connectionMode: {
10937
10983
  choices: ["sse", "websocket"],
10938
10984
  default: "sse",
@@ -11093,6 +11139,7 @@ window.__ModuleLoader__.load({
11093
11139
  otherModels: value?.otherModels === "off" ? "off" : "on",
11094
11140
  compactionMode: value?.compactionMode === "cloud" ? "cloud" : "dsh",
11095
11141
  reasoningCache: normalizeReasoningCache(value?.reasoningCache),
11142
+ defaultReasoningEffort: normalizeDefaultReasoningEffort(value?.[DEFAULT_REASONING_EFFORT_FIELD]),
11096
11143
  subagentBackend: value?.subagentBackend === "codex" ? "codex" : "dsh",
11097
11144
  subagentBackendAvailable,
11098
11145
  subagentRuntimeInstalled,
@@ -11163,6 +11210,7 @@ window.__ModuleLoader__.load({
11163
11210
  otherModels: value?.otherModels === "off" ? "off" : "on",
11164
11211
  compactionMode: value?.compactionMode === "cloud" ? "cloud" : "dsh",
11165
11212
  reasoningCache: normalizeReasoningCache(value?.reasoningCache),
11213
+ [DEFAULT_REASONING_EFFORT_FIELD]: normalizeDefaultReasoningEffort(value?.[DEFAULT_REASONING_EFFORT_FIELD]),
11166
11214
  subagentBackend: value?.subagentBackend === "codex" ? "codex" : "dsh",
11167
11215
  ...readCapabilitySettings(value),
11168
11216
  [QUICK_QUOTA_MODE_FIELD]: normalizeQuickQuotaMode(value?.[QUICK_QUOTA_MODE_FIELD], value?.[LEGACY_QUICK_QUOTA_FIELD]),
@@ -11762,7 +11810,7 @@ window.__ModuleLoader__.load({
11762
11810
  }
11763
11811
  //#endregion
11764
11812
  //#region src/version.js
11765
- const PACKAGE_VERSION = "3.1.7";
11813
+ const PACKAGE_VERSION = "3.1.8";
11766
11814
  //#endregion
11767
11815
  //#region src/client-recovery.js
11768
11816
  async function recoveryCall(rpc, endpoint, payload = {}, timeoutMs = 1e4) {
@@ -11995,9 +12043,11 @@ window.__ModuleLoader__.load({
11995
12043
  setOpen(true);
11996
12044
  };
11997
12045
  const leave = () => {
12046
+ clearTimeout(dismissTimer.current);
11998
12047
  if (!pinned.current) dismissTimer.current = setTimeout(() => setOpen(false), 150);
11999
12048
  };
12000
12049
  const dismiss = () => {
12050
+ clearTimeout(dismissTimer.current);
12001
12051
  pinned.current = false;
12002
12052
  setOpen(false);
12003
12053
  };
@@ -12014,7 +12064,7 @@ window.__ModuleLoader__.load({
12014
12064
  });
12015
12065
  useDismissOnOutsidePointer(trigger, visible, dismiss, panel);
12016
12066
  (0, react.useEffect)(() => {
12017
- setOpen(false);
12067
+ dismiss();
12018
12068
  }, [current?.model, quotaEnabled]);
12019
12069
  (0, react.useEffect)(() => {
12020
12070
  if (!visible) return;
@@ -12052,6 +12102,7 @@ window.__ModuleLoader__.load({
12052
12102
  onMouseEnter: enter,
12053
12103
  onMouseLeave: leave,
12054
12104
  onClick: () => {
12105
+ clearTimeout(dismissTimer.current);
12055
12106
  if (pinned.current) dismiss();
12056
12107
  else {
12057
12108
  pinned.current = true;
@@ -12069,7 +12120,7 @@ window.__ModuleLoader__.load({
12069
12120
  value: quota.remainingPercent,
12070
12121
  "aria-hidden": "true"
12071
12122
  }) : null,
12072
- preferenceSnapshot.quickQuotaMode !== "bar" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [`${percent(quota.remainingPercent)}%`, forecastMode ? ` · ${formatQuotaForecast(quota.forecast, t, quota)}` : ""] }) : null
12123
+ preferenceSnapshot.quickQuotaMode !== "bar" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: `${percent(quota.remainingPercent)}%` }) : null
12073
12124
  ]
12074
12125
  }, `${quota.windowSeconds}-${index}`))
12075
12126
  }), visible ? (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
@@ -12654,6 +12705,7 @@ window.__ModuleLoader__.load({
12654
12705
  function voiceCallCapability(surface = globalThis) {
12655
12706
  if (surface.isSecureContext === false) return "voice-insecure";
12656
12707
  if (typeof surface.navigator?.mediaDevices?.getUserMedia !== "function") return "voice-no-microphone";
12708
+ if (surface.__dshWebRtcFallback && Object.getOwnPropertyDescriptor(surface, "RTCPeerConnection")?.get) return "voice-no-webrtc";
12657
12709
  if (typeof surface.RTCPeerConnection !== "function") return "voice-no-webrtc";
12658
12710
  }
12659
12711
  //#endregion
@@ -13555,6 +13607,12 @@ void main(){
13555
13607
  const [micOff, setMicOff] = (0, react.useState)(false);
13556
13608
  const [speakerOff, setSpeakerOff] = (0, react.useState)(false);
13557
13609
  const enabled = snapshot.status === "ready" && snapshot.voiceCall === "on";
13610
+ const capability = enabled ? voiceCallCapability() : void 0;
13611
+ (0, react.useEffect)(() => {
13612
+ setProblem("");
13613
+ setUnsupported(false);
13614
+ setBrowserCopied(false);
13615
+ }, [sessionId, capability]);
13558
13616
  (0, react.useLayoutEffect)(() => {
13559
13617
  if (!enabled) {
13560
13618
  setPlace(void 0);
@@ -13696,10 +13754,26 @@ void main(){
13696
13754
  });
13697
13755
  if (!enabled || !place) return anchor;
13698
13756
  const visible = state !== "idle" || place.idle;
13699
- const browserUrl = unsupported && unsupported !== "voice-insecure" ? voiceBrowserUrl(window.location.href, sessionId) : void 0;
13757
+ const browserUrl = capability === "voice-no-webrtc" || unsupported && unsupported !== "voice-insecure" ? voiceBrowserUrl(window.location.href, sessionId) : void 0;
13700
13758
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
13701
13759
  anchor,
13702
- visible ? (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
13760
+ visible ? (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [state === "idle" && capability === "voice-no-webrtc" && browserUrl ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
13761
+ ref: button,
13762
+ href: browserUrl,
13763
+ target: "_blank",
13764
+ rel: "noopener noreferrer",
13765
+ className: `${place.className} codexVoiceCall`,
13766
+ "data-state": "browser",
13767
+ "aria-label": t("voiceBrowserCall"),
13768
+ title: t("voiceBrowserCall"),
13769
+ style: {
13770
+ left: place.left,
13771
+ top: place.top,
13772
+ width: place.width,
13773
+ height: place.height
13774
+ },
13775
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Bars, {})
13776
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
13703
13777
  ref: button,
13704
13778
  type: "button",
13705
13779
  className: `${place.className} codexVoiceCall`,
@@ -14226,6 +14300,86 @@ void main(){
14226
14300
  })]
14227
14301
  });
14228
14302
  }
14303
+ Object.freeze({
14304
+ imageCapability: ["imageGeneration", "imageEditing"],
14305
+ imageEntryPoints: ["imageShortcut"],
14306
+ sketchCanvas: ["imageSketch"],
14307
+ sketchAgent: ["imageSketchAgent"],
14308
+ imageBrowsing: ["imageViewer", "imageAnnotations"]
14309
+ });
14310
+ //#endregion
14311
+ //#region src/image-preferences.jsx
14312
+ function ImageChoice({ t, label, hint, value, text, items, disabled, onSelect }) {
14313
+ const [open, setOpen] = (0, react.useState)(false);
14314
+ const anchor = (0, react.useRef)(null);
14315
+ (0, react.useEffect)(() => {
14316
+ if (!open || disabled) return;
14317
+ const escape = (event) => {
14318
+ if (event.key !== "Escape") return;
14319
+ event.preventDefault();
14320
+ event.stopPropagation();
14321
+ setOpen(false);
14322
+ anchor.current?.focus();
14323
+ };
14324
+ window.addEventListener("keydown", escape, true);
14325
+ return () => window.removeEventListener("keydown", escape, true);
14326
+ }, [open, disabled]);
14327
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14328
+ className: "codexSubscriptionPreference codexImagePreference",
14329
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14330
+ className: "codexSubscriptionPreferenceCopy",
14331
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }), hint ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
14332
+ t,
14333
+ children: hint
14334
+ }) : null]
14335
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Menu, {
14336
+ open: open && !disabled,
14337
+ items,
14338
+ selectedId: value,
14339
+ onSelect: (id) => {
14340
+ setOpen(false);
14341
+ onSelect(id);
14342
+ },
14343
+ onClose: () => setOpen(false),
14344
+ align: "end",
14345
+ side: "bottom",
14346
+ portal: true,
14347
+ compact: true,
14348
+ anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
14349
+ ref: anchor,
14350
+ type: "button",
14351
+ className: "codexSubscriptionContextTrigger",
14352
+ "aria-label": label,
14353
+ "aria-haspopup": "menu",
14354
+ "aria-expanded": open && !disabled,
14355
+ disabled,
14356
+ onClick: () => setOpen((current) => !current),
14357
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: text }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronDownOutline14, {})]
14358
+ })
14359
+ })]
14360
+ });
14361
+ }
14362
+ //#endregion
14363
+ //#region src/default-reasoning-preferences.jsx
14364
+ function DefaultReasoningEffortPreference({ preference, t }) {
14365
+ const snapshot = usePreferenceSnapshot(preference);
14366
+ const value = normalizeDefaultReasoningEffortChoice(snapshot[DEFAULT_REASONING_EFFORT_FIELD]);
14367
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ImageChoice, {
14368
+ t,
14369
+ label: t("defaultReasoningEffort"),
14370
+ hint: t("defaultReasoningEffortHint"),
14371
+ value,
14372
+ text: t(`defaultReasoningEffort_${value}`),
14373
+ items: DEFAULT_REASONING_EFFORTS.map((id) => ({
14374
+ id,
14375
+ label: t(`defaultReasoningEffort_${id}`)
14376
+ })),
14377
+ disabled: snapshot.status !== "ready" || !snapshot.writable || snapshot.saving,
14378
+ onSelect: (effort) => {
14379
+ preference.set({ [DEFAULT_REASONING_EFFORT_FIELD]: effort });
14380
+ }
14381
+ });
14382
+ }
14229
14383
  //#endregion
14230
14384
  //#region src/client-runtime-management.jsx
14231
14385
  function RuntimeManagement({ rpc, preference, t }) {
@@ -17209,40 +17363,45 @@ void main(){
17209
17363
  }, [rpc]);
17210
17364
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
17211
17365
  className: "codexSubscriptionCard codexSubscriptionStorage",
17212
- "aria-label": t("storageTitle"),
17366
+ "aria-label": t("storageForecast"),
17213
17367
  children: [
17214
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("storageTitle") }),
17215
17368
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17369
+ className: "codexSubscriptionStorageHead",
17370
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17371
+ className: "codexSubscriptionStorageTitle",
17372
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("storageForecast") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("output", {
17373
+ role: "status",
17374
+ children: usage ? `${(usage.bytes / 1024).toFixed(1)} / ${(usage.limit / 1024).toFixed(0)} KiB` : t("storageLoading")
17375
+ })]
17376
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17377
+ className: "codexSubscriptionActions",
17378
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
17379
+ type: "button",
17380
+ variant: "outline",
17381
+ disabled: busy,
17382
+ onClick: () => void read(false),
17383
+ children: t("runtimeRefresh")
17384
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
17385
+ type: "button",
17386
+ variant: "outline",
17387
+ disabled: busy || !usage?.bytes,
17388
+ onClick: () => setConfirm(true),
17389
+ children: t("storageClear")
17390
+ })]
17391
+ })]
17392
+ }),
17393
+ usage ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17216
17394
  className: "codexSubscriptionStorageMeter",
17217
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("storageForecast") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("output", {
17218
- role: "status",
17219
- children: usage ? `${(usage.bytes / 1024).toFixed(1)} / ${(usage.limit / 1024).toFixed(0)} KiB` : t("storageLoading")
17220
- })] }), usage ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("progress", {
17395
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("progress", {
17221
17396
  "aria-label": t("storageForecast"),
17222
17397
  value: usage.bytes,
17223
17398
  max: usage.limit
17224
- }) : null]
17225
- }),
17399
+ })
17400
+ }) : null,
17226
17401
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
17227
17402
  className: "codexSubscriptionHelp",
17228
17403
  children: t("storageHint")
17229
17404
  }),
17230
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17231
- className: "codexSubscriptionActions",
17232
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
17233
- type: "button",
17234
- variant: "outline",
17235
- disabled: busy,
17236
- onClick: () => void read(false),
17237
- children: t("runtimeRefresh")
17238
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
17239
- type: "button",
17240
- variant: "outline",
17241
- disabled: busy || !usage?.bytes,
17242
- onClick: () => setConfirm(true),
17243
- children: t("storageClear")
17244
- })]
17245
- }),
17246
17405
  confirm ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17247
17406
  className: "codexSubscriptionConfirm",
17248
17407
  role: "group",
@@ -17919,65 +18078,6 @@ void main(){
17919
18078
  ]
17920
18079
  });
17921
18080
  }
17922
- Object.freeze({
17923
- imageCapability: ["imageGeneration", "imageEditing"],
17924
- imageEntryPoints: ["imageShortcut"],
17925
- sketchCanvas: ["imageSketch"],
17926
- sketchAgent: ["imageSketchAgent"],
17927
- imageBrowsing: ["imageViewer", "imageAnnotations"]
17928
- });
17929
- //#endregion
17930
- //#region src/image-preferences.jsx
17931
- function ImageChoice({ t, label, hint, value, text, items, disabled, onSelect }) {
17932
- const [open, setOpen] = (0, react.useState)(false);
17933
- const anchor = (0, react.useRef)(null);
17934
- (0, react.useEffect)(() => {
17935
- if (!open || disabled) return;
17936
- const escape = (event) => {
17937
- if (event.key !== "Escape") return;
17938
- event.preventDefault();
17939
- event.stopPropagation();
17940
- setOpen(false);
17941
- anchor.current?.focus();
17942
- };
17943
- window.addEventListener("keydown", escape, true);
17944
- return () => window.removeEventListener("keydown", escape, true);
17945
- }, [open, disabled]);
17946
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17947
- className: "codexSubscriptionPreference codexImagePreference",
17948
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17949
- className: "codexSubscriptionPreferenceCopy",
17950
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }), hint ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
17951
- t,
17952
- children: hint
17953
- }) : null]
17954
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Menu, {
17955
- open: open && !disabled,
17956
- items,
17957
- selectedId: value,
17958
- onSelect: (id) => {
17959
- setOpen(false);
17960
- onSelect(id);
17961
- },
17962
- onClose: () => setOpen(false),
17963
- align: "end",
17964
- side: "bottom",
17965
- portal: true,
17966
- compact: true,
17967
- anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
17968
- ref: anchor,
17969
- type: "button",
17970
- className: "codexSubscriptionContextTrigger",
17971
- "aria-label": label,
17972
- "aria-haspopup": "menu",
17973
- "aria-expanded": open && !disabled,
17974
- disabled,
17975
- onClick: () => setOpen((current) => !current),
17976
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: text }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronDownOutline14, {})]
17977
- })
17978
- })]
17979
- });
17980
- }
17981
18081
  //#endregion
17982
18082
  //#region src/client-pages.jsx
17983
18083
  const ready = (snapshot) => snapshot.status === "ready" && snapshot.writable === true;
@@ -18235,6 +18335,10 @@ void main(){
18235
18335
  defaultModel,
18236
18336
  t
18237
18337
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "codexSubscriptionDivider" })] }),
18338
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DefaultReasoningEffortPreference, {
18339
+ preference,
18340
+ t
18341
+ }),
18238
18342
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PickerModelsPreference, {
18239
18343
  preference,
18240
18344
  t
package/lib/index.js CHANGED
@@ -461,6 +461,19 @@ const VOICE_LANGUAGES = Object.freeze([
461
461
  const normalizeVoiceCall = (value) => value === "on" ? "on" : "off";
462
462
  const normalizeVoiceVoice = (value) => VOICE_VOICES.includes(value) ? value : "cove";
463
463
  const normalizeVoiceLanguage = (value) => VOICE_LANGUAGES.includes(value) ? value : "auto";
464
+ const DEFAULT_REASONING_EFFORT_FIELD = "defaultReasoningEffort";
465
+ const DEFAULT_REASONING_EFFORTS = Object.freeze([
466
+ "auto",
467
+ "off",
468
+ "minimal",
469
+ "low",
470
+ "medium",
471
+ "high",
472
+ "xhigh",
473
+ "max"
474
+ ]);
475
+ const DEFAULT_REASONING_EFFORT = "auto";
476
+ const normalizeDefaultReasoningEffort = (value) => DEFAULT_REASONING_EFFORTS.includes(value) ? value : DEFAULT_REASONING_EFFORT;
464
477
  const REASONING_SUMMARY_FIELD = "reasoningSummary";
465
478
  const REASONING_SUMMARIES = Object.freeze([
466
479
  "auto",
@@ -604,6 +617,73 @@ const normalizeQuickQuotaMode = (value, legacyVisible = false) => [
604
617
  ].includes(value) ? value : legacyVisible === true ? QUICK_QUOTA_MODE_PERCENT : "off";
605
618
  const supportsCodexFastMode = (modelId) => typeof modelId === "string" && (/^gpt-5\.(?:5|6)(?:$|-)/u.test(modelId) || modelId === "gpt-5.4" || modelId === "gpt-6-astra");
606
619
  //#endregion
620
+ //#region src/default-reasoning-effort.js
621
+ function modelInfo(info, preference, modelDefault) {
622
+ const efforts = info?.reasoning?.efforts;
623
+ if (!Array.isArray(efforts)) return info;
624
+ const supported = (effort) => efforts.some((value) => value.id === effort);
625
+ const fallback = supported(modelDefault) ? modelDefault : info.reasoning.defaultEffort;
626
+ const selected = preference !== "auto" && supported(preference) ? preference : fallback;
627
+ return supported(selected) ? {
628
+ ...info,
629
+ reasoning: {
630
+ ...info.reasoning,
631
+ defaultEffort: selected
632
+ }
633
+ } : info;
634
+ }
635
+ function withDefaultReasoningEffort(adapter, { provider = "openai-codex", preference, modelDefault } = {}) {
636
+ const snapshot = (model) => ({
637
+ choice: normalizeDefaultReasoningEffort(preference?.()),
638
+ fallback: modelDefault?.(model)
639
+ });
640
+ const optionsFor = (options, info) => options.reasoningEffort !== void 0 || options.provider !== provider || options.model !== info.id || info.reasoning?.defaultEffort === void 0 ? options : {
641
+ ...options,
642
+ reasoningEffort: info.reasoning.defaultEffort
643
+ };
644
+ const prepare = async (target, args, captured) => {
645
+ const call = await target.prepareCall(...args);
646
+ const info = modelInfo(call.model, captured.choice, captured.fallback);
647
+ return {
648
+ ...call,
649
+ model: info,
650
+ stream: (options) => call.stream(optionsFor(options, info))
651
+ };
652
+ };
653
+ return new Proxy(adapter, { get(target, property) {
654
+ const value = Reflect.get(target, property, target);
655
+ if (property === "resolveModel" && typeof value === "function") return async (...args) => {
656
+ if (args[0] !== provider) return value.apply(target, args);
657
+ const captured = snapshot(args[1]);
658
+ return modelInfo(await value.apply(target, args), captured.choice, captured.fallback);
659
+ };
660
+ if (property === "prepareCall" && typeof value === "function") return (...args) => args[0] === provider ? prepare(target, args, snapshot(args[1])) : value.apply(target, args);
661
+ if (property === "stream" && typeof value === "function") return (options) => {
662
+ if (options.provider !== provider) return value.call(target, options);
663
+ const captured = snapshot(options.model);
664
+ return (async function* () {
665
+ let call;
666
+ try {
667
+ if (typeof target.prepareCall === "function") call = await prepare(target, [
668
+ options.provider,
669
+ options.model,
670
+ options.signal
671
+ ], captured);
672
+ else {
673
+ const info = modelInfo(await target.resolveModel(options.provider, options.model, options.signal), captured.choice, captured.fallback);
674
+ call = { stream: (input) => value.call(target, optionsFor(input, info)) };
675
+ }
676
+ } catch {
677
+ yield* value.call(target, options);
678
+ return;
679
+ }
680
+ yield* call.stream(options);
681
+ })();
682
+ };
683
+ return typeof value === "function" ? value.bind(target) : value;
684
+ } });
685
+ }
686
+ //#endregion
607
687
  //#region src/preference-fields.js
608
688
  const PREFERENCE_FIELDS = Object.freeze({
609
689
  compactionMode: {
@@ -620,6 +700,11 @@ const PREFERENCE_FIELDS = Object.freeze({
620
700
  default: "on",
621
701
  error: "Invalid reasoning cache preference"
622
702
  },
703
+ [DEFAULT_REASONING_EFFORT_FIELD]: {
704
+ choices: DEFAULT_REASONING_EFFORTS,
705
+ default: DEFAULT_REASONING_EFFORT,
706
+ error: "Invalid default reasoning effort"
707
+ },
623
708
  connectionMode: {
624
709
  choices: ["sse", "websocket"],
625
710
  default: "sse",
@@ -950,7 +1035,9 @@ async function windowsSystemProxy(options = {}) {
950
1035
  "ProxyEnable"
951
1036
  ], {
952
1037
  windowsHide: true,
953
- encoding: "utf8"
1038
+ encoding: "utf8",
1039
+ timeout: 1e4,
1040
+ signal: options.signal
954
1041
  });
955
1042
  if (!/REG_DWORD\s+0x1\b/iu.test(enabled.stdout)) return void 0;
956
1043
  const configured = await run(reg, [
@@ -960,7 +1047,9 @@ async function windowsSystemProxy(options = {}) {
960
1047
  "ProxyServer"
961
1048
  ], {
962
1049
  windowsHide: true,
963
- encoding: "utf8"
1050
+ encoding: "utf8",
1051
+ timeout: 1e4,
1052
+ signal: options.signal
964
1053
  });
965
1054
  return selectWindowsProxy(/^\s*ProxyServer\s+REG_\w+\s+(.+)$/imu.exec(configured.stdout)?.[1]);
966
1055
  } catch {
@@ -970,7 +1059,11 @@ async function windowsSystemProxy(options = {}) {
970
1059
  async function macSystemProxy(options = {}) {
971
1060
  const run = options.execFile ?? execFileAsync;
972
1061
  try {
973
- const result = await run("/usr/sbin/scutil", ["--proxy"], { encoding: "utf8" });
1062
+ const result = await run("/usr/sbin/scutil", ["--proxy"], {
1063
+ encoding: "utf8",
1064
+ timeout: 1e4,
1065
+ signal: options.signal
1066
+ });
974
1067
  if (!/^\s*HTTPSEnable\s*:\s*1\s*$/imu.test(result.stdout)) return void 0;
975
1068
  const host = /^\s*HTTPSProxy\s*:\s*(\S+)\s*$/imu.exec(result.stdout)?.[1];
976
1069
  const port = /^\s*HTTPSPort\s*:\s*(\d+)\s*$/imu.exec(result.stdout)?.[1];
@@ -2696,7 +2789,8 @@ const SUPPORTED_RUNTIME_VERSIONS = Object.freeze([
2696
2789
  "0.2.1-alpha.5",
2697
2790
  "0.2.1-rc.1",
2698
2791
  "0.2.1-rc.2",
2699
- "0.2.1-rc.3"
2792
+ "0.2.1-rc.3",
2793
+ "0.2.1-rc.4"
2700
2794
  ]);
2701
2795
  const require = createRequire(import.meta.url);
2702
2796
  const execute = promisify(execFile);
@@ -3506,7 +3600,7 @@ function inheritedOriginalImageRef(session, assetId) {
3506
3600
  }
3507
3601
  //#endregion
3508
3602
  //#region src/version.js
3509
- const PACKAGE_VERSION = "3.1.7";
3603
+ const PACKAGE_VERSION = "3.1.8";
3510
3604
  const USER_AGENT = `dsh-codex-subscription/${PACKAGE_VERSION}`;
3511
3605
  //#endregion
3512
3606
  //#region src/codex-images.js
@@ -4691,6 +4785,7 @@ function enrollment(value) {
4691
4785
  * credentials: (signal?: AbortSignal) => Promise<{ access?: string, accountId?: string }>,
4692
4786
  * fetch?: typeof fetch,
4693
4787
  * WebSocket: new (url: string, options: object) => any,
4788
+ * resolveProxy?: (options: { target: URL, signal: AbortSignal }) => Promise<string | undefined>,
4694
4789
  * installationId: string,
4695
4790
  * hostName: string,
4696
4791
  * userAgent: string,
@@ -5057,22 +5152,53 @@ function createRemoteControlRelay(options) {
5057
5152
  };
5058
5153
  const connectOnce = async (signal) => {
5059
5154
  const current = await ensureEnrollment(signal);
5155
+ if (signal.aborted) return;
5156
+ const proxy = endpoints.websocket.protocol === "wss:" ? await new Promise((resolve, reject) => {
5157
+ const lookup = AbortSignal.any([signal, AbortSignal.timeout(REQUEST_TIMEOUT_MS)]);
5158
+ const abort = () => reject(signal.aborted ? signal.reason : new RemoteControlError("timeout", "Proxy resolution timed out"));
5159
+ lookup.addEventListener("abort", abort, { once: true });
5160
+ Promise.resolve().then(() => {
5161
+ lookup.throwIfAborted();
5162
+ return (options.resolveProxy ?? resolveCodexOAuthProxy)({
5163
+ target: endpoints.websocket,
5164
+ signal: lookup
5165
+ });
5166
+ }).then(resolve, reject).finally(() => lookup.removeEventListener("abort", abort));
5167
+ if (lookup.aborted) abort();
5168
+ }) : void 0;
5169
+ if (signal.aborted) return;
5060
5170
  await new Promise((resolve, reject) => {
5061
- const ws = new options.WebSocket(endpoints.websocket.toString(), { headers: {
5062
- authorization: `Bearer ${current.token}`,
5063
- "user-agent": options.userAgent,
5064
- "x-codex-installation-id": installation,
5065
- "x-codex-name": Buffer.from(options.hostName).toString("base64"),
5066
- "x-codex-protocol-version": PROTOCOL_VERSION,
5067
- "x-codex-server-id": current.serverId,
5068
- ...subscribeCursor === void 0 ? {} : { "x-codex-subscribe-cursor": subscribeCursor }
5069
- } });
5171
+ const connecting = new AbortController();
5172
+ const agent = proxy ? new HttpsProxyAgent(proxy, { signal: connecting.signal }) : void 0;
5173
+ const ws = new options.WebSocket(endpoints.websocket.toString(), {
5174
+ handshakeTimeout: REQUEST_TIMEOUT_MS,
5175
+ ...agent ? { agent } : {},
5176
+ headers: {
5177
+ authorization: `Bearer ${current.token}`,
5178
+ "user-agent": options.userAgent,
5179
+ "x-codex-installation-id": installation,
5180
+ "x-codex-name": Buffer.from(options.hostName).toString("base64"),
5181
+ "x-codex-protocol-version": PROTOCOL_VERSION,
5182
+ "x-codex-server-id": current.serverId,
5183
+ ...subscribeCursor === void 0 ? {} : { "x-codex-subscribe-cursor": subscribeCursor }
5184
+ }
5185
+ });
5070
5186
  socket = ws;
5071
5187
  let queue = Promise.resolve();
5072
- const onAbort = () => ws.close();
5188
+ const onAbort = () => {
5189
+ stopBeat();
5190
+ ws.close();
5191
+ };
5073
5192
  signal.addEventListener("abort", onAbort, { once: true });
5074
5193
  let ping;
5075
5194
  let silent;
5195
+ const handshake = setTimeout(() => {
5196
+ stopBeat();
5197
+ try {
5198
+ (ws.terminate ?? ws.close).call(ws);
5199
+ } catch {}
5200
+ reject(new RemoteControlError("timeout", "Remote Control connection timed out"));
5201
+ }, REQUEST_TIMEOUT_MS);
5076
5202
  const hearFrom = () => {
5077
5203
  clearTimeout(silent);
5078
5204
  silent = setTimeout(() => {
@@ -5083,10 +5209,14 @@ function createRemoteControlRelay(options) {
5083
5209
  }, options.pongTimeoutMs ?? PONG_TIMEOUT_MS);
5084
5210
  };
5085
5211
  const stopBeat = () => {
5212
+ clearTimeout(handshake);
5086
5213
  clearInterval(ping);
5087
5214
  clearTimeout(silent);
5215
+ connecting.abort();
5216
+ agent?.destroy();
5088
5217
  };
5089
5218
  ws.on("open", () => {
5219
+ clearTimeout(handshake);
5090
5220
  state.status = "connected";
5091
5221
  state.connectedAt = now();
5092
5222
  state.lastError = void 0;
@@ -5131,6 +5261,7 @@ function createRemoteControlRelay(options) {
5131
5261
  signal.removeEventListener("abort", onAbort);
5132
5262
  resolve();
5133
5263
  });
5264
+ if (signal.aborted) onAbort();
5134
5265
  });
5135
5266
  assemblies.clear();
5136
5267
  socket = void 0;
@@ -5147,6 +5278,7 @@ function createRemoteControlRelay(options) {
5147
5278
  await connectOnce(signal);
5148
5279
  if (state.connectedAt !== void 0 && now() - state.connectedAt >= STABLE_MS) delay = INITIAL_RECONNECT_MS;
5149
5280
  } catch (error) {
5281
+ if (signal.aborted) break;
5150
5282
  asked = error?.retryAfterMs;
5151
5283
  state.lastError = error?.code ?? "network";
5152
5284
  if (options.debug) state.detail = String(error?.message ?? error).slice(0, 160);
@@ -10304,6 +10436,9 @@ function visibleModel(value, displayNames, now) {
10304
10436
  const reserve = id === "gpt-reserve" && ["list", "hide"].includes(value.visibility);
10305
10437
  if (id === void 0 || value.visibility !== "list" && !reserve) return void 0;
10306
10438
  const supported = Array.isArray(value.supported_reasoning_levels) ? value.supported_reasoning_levels : [];
10439
+ const thinkingLevelMap = reasoningMap(supported);
10440
+ const defaultEffort = value.default_reasoning_level === "none" ? "off" : value.default_reasoning_level;
10441
+ const defaultReasoningEffort = LEVELS.includes(defaultEffort) && thinkingLevelMap[defaultEffort] != null ? defaultEffort : void 0;
10307
10442
  const input = Array.isArray(value.input_modalities) ? value.input_modalities.filter((item) => ["text", "image"].includes(item)) : ["text", "image"];
10308
10443
  const unsupported = unsupportedCapabilities({
10309
10444
  ...value,
@@ -10328,7 +10463,8 @@ function visibleModel(value, displayNames, now) {
10328
10463
  ...positiveInteger(value.max_context_window) === void 0 ? {} : { maxContextWindow: value.max_context_window },
10329
10464
  reasoning: supported.length > 0,
10330
10465
  supportsReasoningEffortUpdates: value.supports_reasoning_effort_updates === true,
10331
- thinkingLevelMap: reasoningMap(supported),
10466
+ thinkingLevelMap,
10467
+ ...defaultReasoningEffort === void 0 ? {} : { defaultReasoningEffort },
10332
10468
  supportVerbosity: value.support_verbosity === true,
10333
10469
  defaultVerbosity: [
10334
10470
  "low",
@@ -10381,6 +10517,7 @@ function mergeModel(baseModels, remote) {
10381
10517
  reasoning: remote.reasoning,
10382
10518
  supportsReasoningEffortUpdates: remote.supportsReasoningEffortUpdates,
10383
10519
  thinkingLevelMap: remote.thinkingLevelMap,
10520
+ ...remote.defaultReasoningEffort === void 0 ? {} : { defaultReasoningEffort: remote.defaultReasoningEffort },
10384
10521
  ...remote.contextWindow === void 0 ? {} : { contextWindow: remote.contextWindow },
10385
10522
  ...remote.maxContextWindow === void 0 ? {} : { maxContextWindow: remote.maxContextWindow },
10386
10523
  ...base.id === remote.id ? {} : { cost: {
@@ -10701,6 +10838,12 @@ const CODEX_SEARCH_URL = "https://chatgpt.com/backend-api/codex/alpha/search";
10701
10838
  const DEFAULT_MODEL = "gpt-5.6-luna";
10702
10839
  const MAX_OUTPUT_TOKENS = 4096;
10703
10840
  const MAX_SOURCE_DATE = 64;
10841
+ const RETRYABLE_STATUSES = /* @__PURE__ */ new Set([
10842
+ 500,
10843
+ 502,
10844
+ 503,
10845
+ 504
10846
+ ]);
10704
10847
  const record$5 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
10705
10848
  const nonEmpty = (value) => typeof value === "string" && value.length > 0 ? value : void 0;
10706
10849
  const displayText = (value) => {
@@ -10765,7 +10908,7 @@ function createCodexSearchProvider(options) {
10765
10908
  const id = nonEmpty(options.resolveSessionId?.()) ?? randomUUID();
10766
10909
  let response;
10767
10910
  try {
10768
- response = await fetchSearch(CODEX_SEARCH_URL, {
10911
+ const init = {
10769
10912
  method: "POST",
10770
10913
  redirect: "error",
10771
10914
  headers: {
@@ -10791,19 +10934,35 @@ function createCodexSearchProvider(options) {
10791
10934
  max_output_tokens: MAX_OUTPUT_TOKENS
10792
10935
  }),
10793
10936
  signal
10794
- });
10937
+ };
10938
+ for (let attempt = 0; attempt < 2; attempt++) {
10939
+ response = await fetchSearch(CODEX_SEARCH_URL, init);
10940
+ signal?.throwIfAborted();
10941
+ const requestId = response.headers?.get?.("x-request-id") ?? response.headers?.get?.("cf-ray");
10942
+ const detail = `model=${model}, mode=${preferences.searchMode}, attempt=${attempt + 1}${typeof requestId === "string" && /^[a-zA-Z0-9._:-]{1,128}$/u.test(requestId) ? `, requestId=${requestId}` : ""}`;
10943
+ const retry = attempt === 0 && RETRYABLE_STATUSES.has(response.status);
10944
+ diagnosticLog.log(response.ok ? "info" : "warn", "search", `Codex search HTTP ${response.status}${retry ? "; retrying once on the same source" : ""}`, detail);
10945
+ if (!retry) break;
10946
+ try {
10947
+ response.body?.cancel().catch(() => {});
10948
+ } catch {}
10949
+ await setTimeout$1(300, void 0, { signal });
10950
+ }
10795
10951
  } catch (error) {
10796
10952
  if (signal?.aborted || error?.name === "AbortError") throw new WebError("Codex search aborted", "WEB_ABORTED", { cause: error });
10797
10953
  throw new WebError("Codex search request failed", "WEB_PROVIDER_ERROR", { cause: error });
10798
10954
  }
10799
10955
  if (!response.ok) {
10800
10956
  const authFailure = await authFailureMessage(response);
10957
+ if (signal?.aborted) throw new WebError("Codex search aborted", "WEB_ABORTED", { cause: signal.reason });
10801
10958
  throw authFailure === "ChatGPT sign-in needs to be renewed" ? new WebError(authFailure, "WEB_PROVIDER_CREDENTIAL_MISSING") : authFailure !== void 0 ? new WebError(authFailure, "WEB_PROVIDER_ERROR") : new WebError(`Codex search request failed (HTTP ${response.status})`, "WEB_PROVIDER_ERROR");
10802
10959
  }
10803
10960
  let value;
10804
10961
  try {
10805
10962
  value = await response.json();
10963
+ signal?.throwIfAborted();
10806
10964
  } catch (error) {
10965
+ if (signal?.aborted || error?.name === "AbortError") throw new WebError("Codex search aborted", "WEB_ABORTED", { cause: error });
10807
10966
  throw new WebError("Codex returned an unreadable search response", "WEB_PROVIDER_ERROR", { cause: error });
10808
10967
  }
10809
10968
  try {
@@ -14278,6 +14437,7 @@ function apply(ctx, config = {}) {
14278
14437
  [AUTO_QUOTA_RETRY_FIELD]: normalizeAutoQuotaRetry(settings.get()[AUTO_QUOTA_RETRY_FIELD]),
14279
14438
  compactionMode: settings.get().compactionMode ?? "dsh",
14280
14439
  reasoningCache: normalizeReasoningCache(settings.get().reasoningCache),
14440
+ [DEFAULT_REASONING_EFFORT_FIELD]: normalizeDefaultReasoningEffort(settings.get()[DEFAULT_REASONING_EFFORT_FIELD]),
14281
14441
  connectionMode: settings.get().connectionMode ?? "sse",
14282
14442
  reviewModel: settings.get().reviewModel ?? "session",
14283
14443
  remoteControl: settings.get().remoteControl ?? "off",
@@ -14507,9 +14667,16 @@ function apply(ctx, config = {}) {
14507
14667
  ctx.effect(() => ctx.on?.("session/event", (_session, event) => {
14508
14668
  if (event?.type === "request/context") hiddenDirectory.dependenciesChanged();
14509
14669
  }), "codex-subscription: hidden model dependencies");
14670
+ ctx.effect(() => settings.watch((value, previous) => {
14671
+ if (normalizeDefaultReasoningEffort(value["defaultReasoningEffort"]) !== normalizeDefaultReasoningEffort(previous["defaultReasoningEffort"])) ctx.llm.emitAdaptersUpdated?.();
14672
+ }), "codex-subscription: default reasoning effort");
14510
14673
  ctx.effect(() => {
14511
14674
  const lifetime = new AbortController();
14512
- const readyAdapter = withModelCatalogReady(hiddenDirectory.wrap(observeAdapter(reasoning.wrapAdapter(compaction.wrapAdapter(provider.wrapRetryAdapter(adapter))), provider)), modelCatalog, { signal: lifetime.signal });
14675
+ const defaults = withDefaultReasoningEffort(observeAdapter(reasoning.wrapAdapter(compaction.wrapAdapter(provider.wrapRetryAdapter(adapter))), provider), {
14676
+ preference: () => settings.get()[DEFAULT_REASONING_EFFORT_FIELD],
14677
+ modelDefault: (id) => modelCatalog.metadata(id)?.defaultReasoningEffort
14678
+ });
14679
+ const readyAdapter = withModelCatalogReady(hiddenDirectory.wrap(defaults), modelCatalog, { signal: lifetime.signal });
14513
14680
  const disposeAdapter = ctx.llm.registerAdapter([PROVIDER], readyAdapter);
14514
14681
  Promise.resolve().then(() => modelCatalog.refresh({ signal: lifetime.signal })).catch((error) => {
14515
14682
  if (!lifetime.signal.aborted) ctx.logger?.debug?.("could not refresh Codex model catalog (%s)", error?.code ?? error?.name ?? "unknown error");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-codex-subscription",
3
- "version": "3.1.7",
3
+ "version": "3.1.8",
4
4
  "description": "Use ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images and Fast mode, and control DSH from the ChatGPT mobile app (Beta)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -77,22 +77,22 @@
77
77
  },
78
78
  "peerDependencies": {
79
79
  "@deepseek-ai/cordis": "4.0.4 || 4.0.5-alpha.1 || 4.0.5-alpha.2 || 4.0.5",
80
- "@deepseek-ai/dsh-api-remotes": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
81
- "@deepseek-ai/dsh-client-connection": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
82
- "@deepseek-ai/dsh-client-locale": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
83
- "@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
84
- "@deepseek-ai/dsh-client-ui-model-selection": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
85
- "@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
86
- "@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
87
- "@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
88
- "@deepseek-ai/dsh-client-ui-tool": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
89
- "@deepseek-ai/dsh-credentials": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
90
- "@deepseek-ai/dsh-llm": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
91
- "@deepseek-ai/dsh-llm-pi-ai": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
92
- "@deepseek-ai/dsh-settings": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
93
- "@deepseek-ai/dsh-subagent-codex": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
94
- "@deepseek-ai/dsh-tools": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
95
- "@deepseek-ai/dsh-web": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
80
+ "@deepseek-ai/dsh-api-remotes": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
81
+ "@deepseek-ai/dsh-client-connection": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
82
+ "@deepseek-ai/dsh-client-locale": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
83
+ "@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
84
+ "@deepseek-ai/dsh-client-ui-model-selection": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
85
+ "@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
86
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
87
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
88
+ "@deepseek-ai/dsh-client-ui-tool": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
89
+ "@deepseek-ai/dsh-credentials": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
90
+ "@deepseek-ai/dsh-llm": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
91
+ "@deepseek-ai/dsh-llm-pi-ai": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
92
+ "@deepseek-ai/dsh-settings": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
93
+ "@deepseek-ai/dsh-subagent-codex": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
94
+ "@deepseek-ai/dsh-tools": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
95
+ "@deepseek-ai/dsh-web": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
96
96
  "@deepseek-ai/schemastery": "3.18.1 || ^3.18.2",
97
97
  "@earendil-works/pi-ai": "0.85.1 || 0.87.1 || 1.1.0 || 1.2.0 || 1.3.0 || 1.4.0",
98
98
  "react": "^18.2.0",
@@ -100,25 +100,25 @@
100
100
  },
101
101
  "devDependencies": {
102
102
  "@deepseek-ai/cordis": "4.0.4",
103
- "@deepseek-ai/dsh-api-remotes": "0.2.1-rc.3",
104
- "@deepseek-ai/dsh-client-connection": "0.2.1-rc.3",
105
- "@deepseek-ai/dsh-client-locale": "0.2.1-rc.3",
106
- "@deepseek-ai/dsh-client-ui-chat": "0.2.1-rc.3",
107
- "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.3",
108
- "@deepseek-ai/dsh-client-ui-model-selection": "0.2.1-rc.3",
109
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.3",
110
- "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.3",
111
- "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.3",
112
- "@deepseek-ai/dsh-client-ui-tool": "0.2.1-rc.3",
113
- "@deepseek-ai/dsh-credentials": "0.2.1-rc.3",
103
+ "@deepseek-ai/dsh-api-remotes": "0.2.1-rc.4",
104
+ "@deepseek-ai/dsh-client-connection": "0.2.1-rc.4",
105
+ "@deepseek-ai/dsh-client-locale": "0.2.1-rc.4",
106
+ "@deepseek-ai/dsh-client-ui-chat": "0.2.1-rc.4",
107
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.4",
108
+ "@deepseek-ai/dsh-client-ui-model-selection": "0.2.1-rc.4",
109
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.4",
110
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.4",
111
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.4",
112
+ "@deepseek-ai/dsh-client-ui-tool": "0.2.1-rc.4",
113
+ "@deepseek-ai/dsh-credentials": "0.2.1-rc.4",
114
114
  "@deepseek-ai/dsh-invariants": "0.2.0-rc.2",
115
- "@deepseek-ai/dsh-llm": "0.2.1-rc.3",
116
- "@deepseek-ai/dsh-llm-pi-ai": "0.2.1-rc.3",
117
- "@deepseek-ai/dsh-session": "0.2.1-rc.3",
118
- "@deepseek-ai/dsh-settings": "0.2.1-rc.3",
119
- "@deepseek-ai/dsh-subagent-codex": "0.2.1-rc.3",
120
- "@deepseek-ai/dsh-tools": "0.2.1-rc.3",
121
- "@deepseek-ai/dsh-web": "0.2.1-rc.3",
115
+ "@deepseek-ai/dsh-llm": "0.2.1-rc.4",
116
+ "@deepseek-ai/dsh-llm-pi-ai": "0.2.1-rc.4",
117
+ "@deepseek-ai/dsh-session": "0.2.1-rc.4",
118
+ "@deepseek-ai/dsh-settings": "0.2.1-rc.4",
119
+ "@deepseek-ai/dsh-subagent-codex": "0.2.1-rc.4",
120
+ "@deepseek-ai/dsh-tools": "0.2.1-rc.4",
121
+ "@deepseek-ai/dsh-web": "0.2.1-rc.4",
122
122
  "@deepseek-ai/schemastery": "3.18.4",
123
123
  "@earendil-works/pi-ai": "0.85.1",
124
124
  "@heroicons/react": "2.2.0",
@@ -130,7 +130,7 @@
130
130
  "tsdown": "0.22.2"
131
131
  },
132
132
  "dependencies": {
133
- "@deepseek-ai/dsh-home-paths": "0.2.1-rc.3",
133
+ "@deepseek-ai/dsh-home-paths": "0.2.1-rc.4",
134
134
  "https-proxy-agent": "7.0.6",
135
135
  "ws": "8.21.3"
136
136
  },