dsh-codex-subscription 3.2.12 → 3.2.13

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.de.md CHANGED
@@ -82,7 +82,7 @@ Dieses Plugin unterstützt die neueste DeepSeek-Harness-Version, die in seinen P
82
82
  2. Füge diesen Paketnamen einschließlich Version in das Feld **Paketname oder Adresse** ein:
83
83
 
84
84
  ```text
85
- dsh-codex-subscription@3.2.12
85
+ dsh-codex-subscription@3.2.13
86
86
  ```
87
87
 
88
88
  3. Klicke auf **Installieren** und warte, bis der Vorgang abgeschlossen ist. Folge den Anweisungen auf der Seite; speichere deine Arbeit, bevor du neu startest, falls du dazu aufgefordert wirst.
@@ -99,7 +99,7 @@ Warum die Version angegeben ist: Auf der Plugin-Seite von DSH werden nur Version
99
99
  <summary>Installation über das Terminal (mit einem vorhandenen dsh-Befehl)</summary>
100
100
 
101
101
  ```sh
102
- dsh plugin --profile web add dsh-codex-subscription@3.2.12
102
+ dsh plugin --profile web add dsh-codex-subscription@3.2.13
103
103
  ```
104
104
 
105
105
  Folge den Anweisungen zum Neustart und melde dich anschließend unter **Einstellungen → Codex** an. Sowohl die Plugins-Seite als auch das Terminal verwenden die Installationsverwaltung von DSH.
@@ -112,7 +112,7 @@ Folge den Anweisungen zum Neustart und melde dich anschließend unter **Einstell
112
112
  Melde dich an und wähle in Web ein Codex-Modell aus. Installiere anschließend dasselbe Plugin im Headless-Profil:
113
113
 
114
114
  ```sh
115
- dsh plugin --profile headless add dsh-codex-subscription@3.2.12
115
+ dsh plugin --profile headless add dsh-codex-subscription@3.2.13
116
116
  dsh --profile headless "Reply with only the word: ok"
117
117
  ```
118
118
 
@@ -392,7 +392,7 @@ Suche dieses Plugin auf der DSH-Seite **Plugins** und verwende dort die Aktion z
392
392
  <summary>Terminalbefehle</summary>
393
393
 
394
394
  ```sh
395
- dsh plugin --profile web update dsh-codex-subscription@3.2.12
395
+ dsh plugin --profile web update dsh-codex-subscription@3.2.13
396
396
  ```
397
397
 
398
398
  Nur ausführen, wenn du deinstallieren möchtest:
package/README.en.md CHANGED
@@ -82,7 +82,7 @@ This plugin supports the latest DeepSeek Harness release recorded in its package
82
82
  2. Paste this package name, with its version, into the **Package name or address** field:
83
83
 
84
84
  ```text
85
- dsh-codex-subscription@3.2.12
85
+ dsh-codex-subscription@3.2.13
86
86
  ```
87
87
 
88
88
  3. Click **Install** and wait for completion. Follow the page instructions; save your work before restarting if requested.
@@ -99,7 +99,7 @@ Why the version is included: DSH's plugin page only installs versions that are a
99
99
  <summary>Terminal installation (with an existing dsh command)</summary>
100
100
 
101
101
  ```sh
102
- dsh plugin --profile web add dsh-codex-subscription@3.2.12
102
+ dsh plugin --profile web add dsh-codex-subscription@3.2.13
103
103
  ```
104
104
 
105
105
  Follow the restart instructions, then sign in under **Settings → Codex**. Both the Plugins page and the terminal use DSH's installation management.
@@ -112,7 +112,7 @@ Follow the restart instructions, then sign in under **Settings → Codex**. Both
112
112
  After signing in and selecting a Codex model in Web, install the same plugin in the Headless profile:
113
113
 
114
114
  ```sh
115
- dsh plugin --profile headless add dsh-codex-subscription@3.2.12
115
+ dsh plugin --profile headless add dsh-codex-subscription@3.2.13
116
116
  dsh --profile headless "Reply with only the word: ok"
117
117
  ```
118
118
 
@@ -392,7 +392,7 @@ Find this plugin on the DSH **Plugins** page and use its update or uninstall act
392
392
  <summary>Terminal commands</summary>
393
393
 
394
394
  ```sh
395
- dsh plugin --profile web update dsh-codex-subscription@3.2.12
395
+ dsh plugin --profile web update dsh-codex-subscription@3.2.13
396
396
  ```
397
397
 
398
398
  Run only when you want to uninstall:
package/README.es.md CHANGED
@@ -82,7 +82,7 @@ Este complemento es compatible con la versión más reciente de DeepSeek Harness
82
82
  2. Pega el nombre de este paquete, incluida su versión, en el campo **Nombre o dirección del paquete**:
83
83
 
84
84
  ```text
85
- dsh-codex-subscription@3.2.12
85
+ dsh-codex-subscription@3.2.13
86
86
  ```
87
87
 
88
88
  3. Haz clic en **Instalar** y espera a que termine. Sigue las instrucciones de la página; guarda tu trabajo antes de reiniciar si se te solicita.
@@ -99,7 +99,7 @@ Por qué se incluye la versión: la página de complementos de DSH solo instala
99
99
  <summary>Instalación desde la terminal (con un comando dsh existente)</summary>
100
100
 
101
101
  ```sh
102
- dsh plugin --profile web add dsh-codex-subscription@3.2.12
102
+ dsh plugin --profile web add dsh-codex-subscription@3.2.13
103
103
  ```
104
104
 
105
105
  Sigue las instrucciones para reiniciar y luego inicia sesión en **Configuración → Codex**. Tanto la página Complementos como la terminal usan la administración de instalaciones de DSH.
@@ -112,7 +112,7 @@ Sigue las instrucciones para reiniciar y luego inicia sesión en **Configuració
112
112
  Después de iniciar sesión y seleccionar un modelo de Codex en Web, instala el mismo complemento en el perfil Headless:
113
113
 
114
114
  ```sh
115
- dsh plugin --profile headless add dsh-codex-subscription@3.2.12
115
+ dsh plugin --profile headless add dsh-codex-subscription@3.2.13
116
116
  dsh --profile headless "Reply with only the word: ok"
117
117
  ```
118
118
 
@@ -392,7 +392,7 @@ Busca este plugin en la página **Complementos** de DSH y usa la opción de actu
392
392
  <summary>Comandos de terminal</summary>
393
393
 
394
394
  ```sh
395
- dsh plugin --profile web update dsh-codex-subscription@3.2.12
395
+ dsh plugin --profile web update dsh-codex-subscription@3.2.13
396
396
  ```
397
397
 
398
398
  Ejecuta solo si quieres desinstalarlo:
package/README.fr.md CHANGED
@@ -82,7 +82,7 @@ Ce plugin prend en charge la dernière version de DeepSeek Harness indiquée dan
82
82
  2. Collez ce nom de package, avec sa version, dans le champ **Nom ou adresse du package** :
83
83
 
84
84
  ```text
85
- dsh-codex-subscription@3.2.12
85
+ dsh-codex-subscription@3.2.13
86
86
  ```
87
87
 
88
88
  3. Cliquez sur **Installer** et attendez la fin de l’installation. Suivez les instructions de la page ; enregistrez votre travail avant de redémarrer si cela vous est demandé.
@@ -99,7 +99,7 @@ Pourquoi inclure la version : la page des plugins de DSH n’installe que des ve
99
99
  <summary>Installation dans le terminal (avec une commande dsh déjà installée)</summary>
100
100
 
101
101
  ```sh
102
- dsh plugin --profile web add dsh-codex-subscription@3.2.12
102
+ dsh plugin --profile web add dsh-codex-subscription@3.2.13
103
103
  ```
104
104
 
105
105
  Suivez les instructions de redémarrage, puis connectez-vous dans **Paramètres → Codex**. La page Plugins et le terminal utilisent tous deux le système de gestion des installations de DSH.
@@ -112,7 +112,7 @@ Suivez les instructions de redémarrage, puis connectez-vous dans **Paramètres
112
112
  Après vous être connecté et avoir sélectionné un modèle Codex dans Web, installez le même plugin dans le profil Headless :
113
113
 
114
114
  ```sh
115
- dsh plugin --profile headless add dsh-codex-subscription@3.2.12
115
+ dsh plugin --profile headless add dsh-codex-subscription@3.2.13
116
116
  dsh --profile headless "Reply with only the word: ok"
117
117
  ```
118
118
 
@@ -392,7 +392,7 @@ Trouvez ce plugin sur la page **Plugins** de DSH et utilisez l’action de mise
392
392
  <summary>Commandes de terminal</summary>
393
393
 
394
394
  ```sh
395
- dsh plugin --profile web update dsh-codex-subscription@3.2.12
395
+ dsh plugin --profile web update dsh-codex-subscription@3.2.13
396
396
  ```
397
397
 
398
398
  À exécuter uniquement si vous souhaitez désinstaller :
package/README.ja.md CHANGED
@@ -82,7 +82,7 @@ DSH `0.2.2-rc.1` CLI/Web には Node.js **24.9 以降**が必要です。公式
82
82
  2. バージョンを含めた以下のパッケージ名を、**パッケージ名またはアドレス**欄に貼り付けます。
83
83
 
84
84
  ```text
85
- dsh-codex-subscription@3.2.12
85
+ dsh-codex-subscription@3.2.13
86
86
  ```
87
87
 
88
88
  3. **インストール**をクリックし、完了するまで待ちます。ページの指示に従ってください。再起動を求められた場合は、その前に作業内容を保存してください。
@@ -99,7 +99,7 @@ DSH `0.2.2-rc.1` CLI/Web には Node.js **24.9 以降**が必要です。公式
99
99
  <summary>ターミナルからインストール(dsh コマンドがすでにある場合)</summary>
100
100
 
101
101
  ```sh
102
- dsh plugin --profile web add dsh-codex-subscription@3.2.12
102
+ dsh plugin --profile web add dsh-codex-subscription@3.2.13
103
103
  ```
104
104
 
105
105
  再起動の指示に従い、その後 **設定 → Codex** でサインインしてください。プラグインページとターミナルのどちらからインストールしても、DSH のインストール管理機能が使用されます。
@@ -112,7 +112,7 @@ dsh plugin --profile web add dsh-codex-subscription@3.2.12
112
112
  Web でサインインし、Codex モデルを選択した後、Headless プロファイルにも同じプラグインをインストールします。
113
113
 
114
114
  ```sh
115
- dsh plugin --profile headless add dsh-codex-subscription@3.2.12
115
+ dsh plugin --profile headless add dsh-codex-subscription@3.2.13
116
116
  dsh --profile headless "Reply with only the word: ok"
117
117
  ```
118
118
 
@@ -392,7 +392,7 @@ DSH の **プラグイン** ページでこのプラグインを見つけ、更
392
392
  <summary>ターミナルコマンド</summary>
393
393
 
394
394
  ```sh
395
- dsh plugin --profile web update dsh-codex-subscription@3.2.12
395
+ dsh plugin --profile web update dsh-codex-subscription@3.2.13
396
396
  ```
397
397
 
398
398
  アンインストールする場合にのみ実行してください:
package/README.md CHANGED
@@ -74,7 +74,7 @@ DSH `0.2.2-rc.1` 的 CLI/Web 模式需要 Node.js **24.9 或更高版本**;官
74
74
  2. 在 **包名或地址** 输入框中粘贴下面的包名(已带版本号):
75
75
 
76
76
  ```text
77
- dsh-codex-subscription@3.2.12
77
+ dsh-codex-subscription@3.2.13
78
78
  ```
79
79
 
80
80
  3. 点击 **安装**,等待安装完成;按页面提示操作,需要重启时先保存工作。
@@ -91,7 +91,7 @@ DSH `0.2.2-rc.1` 的 CLI/Web 模式需要 Node.js **24.9 或更高版本**;官
91
91
  <summary>终端安装(已能运行 dsh 命令)</summary>
92
92
 
93
93
  ```sh
94
- dsh plugin --profile web add dsh-codex-subscription@3.2.12
94
+ dsh plugin --profile web add dsh-codex-subscription@3.2.13
95
95
  ```
96
96
 
97
97
  安装完成后按提示重启 DSH,再到 **设置 → Codex 订阅** 登录。插件页面和终端均由 DSH 管理安装。
@@ -104,7 +104,7 @@ dsh plugin --profile web add dsh-codex-subscription@3.2.12
104
104
  先在 Web 中完成登录并选择一次 Codex 模型,再把同一个插件安装到 Headless profile:
105
105
 
106
106
  ```sh
107
- dsh plugin --profile headless add dsh-codex-subscription@3.2.12
107
+ dsh plugin --profile headless add dsh-codex-subscription@3.2.13
108
108
  dsh --profile headless "只回复:ok"
109
109
  ```
110
110
 
@@ -368,7 +368,7 @@ Agent 先在画板绘制可编辑草图,再以该草图为参考调用订阅
368
368
  <summary>终端方式</summary>
369
369
 
370
370
  ```sh
371
- dsh plugin --profile web update dsh-codex-subscription@3.2.12
371
+ dsh plugin --profile web update dsh-codex-subscription@3.2.13
372
372
  ```
373
373
 
374
374
  仅在需要卸载时运行:
package/README.pt.md CHANGED
@@ -82,7 +82,7 @@ Este plugin é compatível com a versão mais recente do DeepSeek Harness regist
82
82
  2. Cole o nome deste pacote, com a versão, no campo **Nome ou endereço do pacote**:
83
83
 
84
84
  ```text
85
- dsh-codex-subscription@3.2.12
85
+ dsh-codex-subscription@3.2.13
86
86
  ```
87
87
 
88
88
  3. Clique em **Instalar** e aguarde a conclusão. Siga as instruções da página; salve seu trabalho antes de reiniciar, se solicitado.
@@ -99,7 +99,7 @@ Por que a versão está incluída: a página de plugins do DSH só instala vers
99
99
  <summary>Instalação pelo terminal (com um comando dsh existente)</summary>
100
100
 
101
101
  ```sh
102
- dsh plugin --profile web add dsh-codex-subscription@3.2.12
102
+ dsh plugin --profile web add dsh-codex-subscription@3.2.13
103
103
  ```
104
104
 
105
105
  Siga as instruções para reiniciar e entre em **Configurações → Codex**. Tanto a página Plugins quanto o terminal usam o gerenciamento de instalações do DSH.
@@ -112,7 +112,7 @@ Siga as instruções para reiniciar e entre em **Configurações → Codex**. Ta
112
112
  Depois de entrar e selecionar um modelo Codex na versão Web, instale o mesmo plugin no perfil Headless:
113
113
 
114
114
  ```sh
115
- dsh plugin --profile headless add dsh-codex-subscription@3.2.12
115
+ dsh plugin --profile headless add dsh-codex-subscription@3.2.13
116
116
  dsh --profile headless "Reply with only the word: ok"
117
117
  ```
118
118
 
@@ -392,7 +392,7 @@ Encontre este plugin na página **Plugins** do DSH e use a opção de atualizaç
392
392
  <summary>Comandos do terminal</summary>
393
393
 
394
394
  ```sh
395
- dsh plugin --profile web update dsh-codex-subscription@3.2.12
395
+ dsh plugin --profile web update dsh-codex-subscription@3.2.13
396
396
  ```
397
397
 
398
398
  Execute somente quando quiser desinstalar:
package/README.ru.md CHANGED
@@ -82,7 +82,7 @@
82
82
  2. Вставьте имя этого пакета вместе с его версией в поле **Package name or address**:
83
83
 
84
84
  ```text
85
- dsh-codex-subscription@3.2.12
85
+ dsh-codex-subscription@3.2.13
86
86
  ```
87
87
 
88
88
  3. Нажмите **Install** и дождитесь завершения. Следуйте инструкциям на странице; если будет предложено перезапустить приложение, перед этим сохраните свою работу.
@@ -99,7 +99,7 @@
99
99
  <summary>Установка через терминал (если команда dsh уже установлена)</summary>
100
100
 
101
101
  ```sh
102
- dsh plugin --profile web add dsh-codex-subscription@3.2.12
102
+ dsh plugin --profile web add dsh-codex-subscription@3.2.13
103
103
  ```
104
104
 
105
105
  Следуйте инструкциям по перезапуску, затем войдите в систему в разделе **Настройки → Codex**. И страница «Плагины», и терминал используют систему управления установками DSH.
@@ -112,7 +112,7 @@ dsh plugin --profile web add dsh-codex-subscription@3.2.12
112
112
  Войдите в систему и выберите модель Codex в Web, затем установите тот же плагин в профиле Headless:
113
113
 
114
114
  ```sh
115
- dsh plugin --profile headless add dsh-codex-subscription@3.2.12
115
+ dsh plugin --profile headless add dsh-codex-subscription@3.2.13
116
116
  dsh --profile headless "Reply with only the word: ok"
117
117
  ```
118
118
 
@@ -392,7 +392,7 @@ DSH управляет диалогами, подтверждениями инс
392
392
  <summary>Команды терминала</summary>
393
393
 
394
394
  ```sh
395
- dsh plugin --profile web update dsh-codex-subscription@3.2.12
395
+ dsh plugin --profile web update dsh-codex-subscription@3.2.13
396
396
  ```
397
397
 
398
398
  Запускайте только в том случае, если хотите удалить плагин:
package/README.zh-CN.md CHANGED
@@ -74,7 +74,7 @@ DSH `0.2.2-rc.1` 的 CLI/Web 模式需要 Node.js **24.9 或更高版本**;官
74
74
  2. 在 **包名或地址** 输入框中粘贴下面的包名(已带版本号):
75
75
 
76
76
  ```text
77
- dsh-codex-subscription@3.2.12
77
+ dsh-codex-subscription@3.2.13
78
78
  ```
79
79
 
80
80
  3. 点击 **安装**,等待安装完成;按页面提示操作,需要重启时先保存工作。
@@ -91,7 +91,7 @@ DSH `0.2.2-rc.1` 的 CLI/Web 模式需要 Node.js **24.9 或更高版本**;官
91
91
  <summary>终端安装(已能运行 dsh 命令)</summary>
92
92
 
93
93
  ```sh
94
- dsh plugin --profile web add dsh-codex-subscription@3.2.12
94
+ dsh plugin --profile web add dsh-codex-subscription@3.2.13
95
95
  ```
96
96
 
97
97
  安装完成后按提示重启 DSH,再到 **设置 → Codex 订阅** 登录。插件页面和终端均由 DSH 管理安装。
@@ -104,7 +104,7 @@ dsh plugin --profile web add dsh-codex-subscription@3.2.12
104
104
  先在 Web 中完成登录并选择一次 Codex 模型,再把同一个插件安装到 Headless profile:
105
105
 
106
106
  ```sh
107
- dsh plugin --profile headless add dsh-codex-subscription@3.2.12
107
+ dsh plugin --profile headless add dsh-codex-subscription@3.2.13
108
108
  dsh --profile headless "只回复:ok"
109
109
  ```
110
110
 
@@ -368,7 +368,7 @@ Agent 先在画板绘制可编辑草图,再以该草图为参考调用订阅
368
368
  <summary>终端方式</summary>
369
369
 
370
370
  ```sh
371
- dsh plugin --profile web update dsh-codex-subscription@3.2.12
371
+ dsh plugin --profile web update dsh-codex-subscription@3.2.13
372
372
  ```
373
373
 
374
374
  仅在需要卸载时运行:
package/lib/client.js CHANGED
@@ -9593,9 +9593,6 @@ window.__ModuleLoader__.load({
9593
9593
  //#endregion
9594
9594
  //#region src/client-styles.js
9595
9595
  const STYLE = `
9596
- .codexNativeModelOption{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px;min-height:32px;color:var(--dsw-alias-label-primary);font-size:13px}
9597
- .codexNativeModelOption>span{display:flex;align-items:center;gap:4px}
9598
- .codexNativeModelOption select{max-width:55%;min-height:24px;padding:0 4px;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-2);color:inherit;font:inherit}
9599
9596
  .codexModelSelect{position:relative;min-width:0}
9600
9597
  .codexModelSelectTrigger{display:flex;align-items:center;gap:4px;min-width:0;max-width:min(360px,45cqw);height:28px;padding:0 4px 0 8px;border:0;border-radius:var(--dsw-radius-sm);outline:0;background:transparent;color:var(--dsw-alias-label-secondary);font-size:13px;font-weight:500;line-height:20px;cursor:pointer}
9601
9598
  .codexModelSelectTrigger:hover:not(:disabled),.codexModelSelectTrigger[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}
@@ -9607,8 +9604,10 @@ window.__ModuleLoader__.load({
9607
9604
  .codexModelSelectChevron{flex:none;color:var(--dsw-alias-label-caption);transition:transform 120ms}
9608
9605
  .codexModelSelectTrigger[aria-expanded=true] .codexModelSelectChevron{transform:rotate(180deg)}
9609
9606
  .codexModelSelectMenu{inset:auto;margin:0;--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);box-sizing:border-box;position:fixed;display:flex;flex-direction:column;width:max-content;min-width:min(240px,calc(100vw - 32px));max-width:min(420px,calc(100vw - 32px));max-height:min(360px,calc(100vh - 32px));padding:4px;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md,12px);background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-layer-1));box-shadow:var(--dsw-elevation-prominent);color:var(--dsw-alias-label-primary);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);overflow:hidden}
9607
+ .codexModelOptionsMenu{border:0;overflow:auto}
9610
9608
  .codexModelSelectCell{box-sizing:border-box;display:flex;align-items:center;gap:6px;width:auto;min-width:100%;height:34px;padding:0 8px;border:none;border-radius:var(--dsw-radius-md);outline:none;background:transparent;color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px;text-align:left;cursor:pointer}
9611
- .codexModelSelectCell:hover,.codexModelSelectCell:focus-visible{background:var(--dsw-alias-interactive-bg-hover)}
9609
+ .codexModelSelectCell:hover:not(:disabled),.codexModelSelectCell:focus-visible{background:var(--dsw-alias-interactive-bg-hover)}
9610
+ .codexModelSelectCell:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}
9612
9611
  .codexModelSelectCellLabel{flex:none;white-space:nowrap}
9613
9612
  .codexModelSelectCellValue{flex:auto;min-width:0;overflow:hidden;color:var(--dsw-alias-label-tertiary);text-align:right;text-overflow:ellipsis;white-space:nowrap}
9614
9613
  .codexModelSelectCellChevron{flex:none;width:12px;height:12px;color:var(--dsw-alias-menu-icon)}
@@ -11674,7 +11673,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11674
11673
  }
11675
11674
  //#endregion
11676
11675
  //#region src/version.js
11677
- const PACKAGE_VERSION = "3.2.12";
11676
+ const PACKAGE_VERSION = "3.2.13";
11678
11677
  //#endregion
11679
11678
  //#region src/client-recovery.js
11680
11679
  async function recoveryCall(rpc, endpoint, payload = {}, timeoutMs = endpoint === "usage" || endpoint.startsWith("usage/") ? 3e4 : 1e4) {
@@ -12059,7 +12058,22 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
12059
12058
  const ForwardRef = /*#__PURE__*/ react.forwardRef(BoltIcon);
12060
12059
  //#endregion
12061
12060
  //#region src/client-model-select.jsx
12062
- function CodexNativeModelOptions({ locked, directory, preference, t, reportFailure }) {
12061
+ function createModelOptionsMenu() {
12062
+ const changes = new EventTarget();
12063
+ let request;
12064
+ return {
12065
+ getSnapshot: () => request,
12066
+ subscribe(listener) {
12067
+ changes.addEventListener("change", listener);
12068
+ return () => changes.removeEventListener("change", listener);
12069
+ },
12070
+ set(value) {
12071
+ request = value;
12072
+ changes.dispatchEvent(new Event("change"));
12073
+ }
12074
+ };
12075
+ }
12076
+ function CodexNativeModelOptions({ locked, directory, preference, t, dismiss, reportFailure, optionsMenu }) {
12063
12077
  const { current } = (0, react.useSyncExternalStore)(directory.subscribe, directory.getSnapshot);
12064
12078
  const snapshot = usePreferenceSnapshot(preference);
12065
12079
  if (current?.provider !== "openai-codex") return null;
@@ -12072,63 +12086,168 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
12072
12086
  });
12073
12087
  const disabled = locked || snapshot.status !== "ready" || !snapshot.writable || snapshot.saving;
12074
12088
  const change = async (field, value) => {
12089
+ const model = directory.getSnapshot().current;
12090
+ if (model?.provider !== current.provider || model.model !== current.model) return;
12075
12091
  await preference.set({ [field]: value });
12076
12092
  if (preference.getSnapshot().error) reportFailure(t("preferenceFailed"));
12077
12093
  };
12078
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(fast || ultrafast) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
12079
- className: "codexNativeModelOption",
12080
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [speed !== "standard" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ForwardRef, {
12081
- className: "codexModelSelectBolt",
12082
- "aria-hidden": "true"
12083
- }), t("speedTitle")] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
12084
- value: speed,
12094
+ const option = (id, label) => ({
12095
+ id,
12096
+ label: t(label)
12097
+ });
12098
+ const speedItems = [option(SPEED_MODE_STANDARD, "speedStandard")];
12099
+ if (fast) speedItems.push(option(SPEED_MODE_FAST, "speedFast"));
12100
+ if (ultrafast) speedItems.push(option(SPEED_MODE_ULTRAFAST, "speedUltrafast"));
12101
+ const verbosityItems = [
12102
+ option(OUTPUT_VERBOSITY_DEFAULT, "verbosityDefault"),
12103
+ option("low", "verbosityLow"),
12104
+ option(OUTPUT_VERBOSITY_MEDIUM, "verbosityMedium"),
12105
+ option(OUTPUT_VERBOSITY_HIGH, "verbosityHigh")
12106
+ ];
12107
+ const row = (field, label, items, value, icon) => {
12108
+ const open = (event) => {
12109
+ const menu = event.currentTarget.closest("[role=\"menu\"]");
12110
+ if (!menu?.id) return;
12111
+ const trigger = [...menu.ownerDocument.querySelectorAll("button[aria-controls]")].find((button) => button.getAttribute("aria-controls") === menu.id);
12112
+ if (!trigger) return;
12113
+ const { width, right, bottom } = menu.getBoundingClientRect();
12114
+ const { innerWidth, innerHeight } = menu.ownerDocument.defaultView;
12115
+ optionsMenu.set({
12116
+ field,
12117
+ label,
12118
+ items,
12119
+ value,
12120
+ trigger,
12121
+ width,
12122
+ right: innerWidth - right,
12123
+ bottom: innerHeight - bottom,
12124
+ select: (next) => {
12125
+ if (next !== value) change(field, next);
12126
+ }
12127
+ });
12128
+ dismiss();
12129
+ };
12130
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
12131
+ type: "button",
12132
+ role: "menuitem",
12133
+ className: "codexModelSelectCell",
12134
+ "aria-haspopup": "menu",
12135
+ "data-codex-model-option": field,
12085
12136
  disabled,
12086
- onChange: (event) => {
12087
- change("speedMode", event.target.value);
12137
+ onClick: open,
12138
+ onKeyDown: (event) => {
12139
+ if (event.key !== "ArrowRight") return;
12140
+ event.preventDefault();
12141
+ event.stopPropagation();
12142
+ open(event);
12088
12143
  },
12089
12144
  children: [
12090
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
12091
- value: "standard",
12092
- children: t("speedStandard")
12145
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12146
+ className: "codexModelSelectCellLabel",
12147
+ children: label
12093
12148
  }),
12094
- fast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
12095
- value: "fast",
12096
- children: t("speedFast")
12149
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12150
+ className: "codexModelSelectCellValue",
12151
+ children: items.find((item) => item.id === value)?.label ?? items[0].label
12097
12152
  }),
12098
- ultrafast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
12099
- value: "ultrafast",
12100
- children: t("speedUltrafast")
12101
- })
12153
+ icon,
12154
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronRightOutline14, { className: "codexModelSelectCellChevron" })
12102
12155
  ]
12103
- })]
12104
- }), verbosity && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
12105
- className: "codexNativeModelOption",
12106
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("verbosityTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
12107
- value: snapshot.outputVerbosity,
12108
- disabled,
12109
- onChange: (event) => {
12110
- change("outputVerbosity", event.target.value);
12111
- },
12112
- children: [
12113
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
12114
- value: "default",
12115
- children: t("verbosityDefault")
12116
- }),
12117
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
12118
- value: "low",
12119
- children: t("verbosityLow")
12120
- }),
12121
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
12122
- value: "medium",
12123
- children: t("verbosityMedium")
12124
- }),
12125
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
12126
- value: "high",
12127
- children: t("verbosityHigh")
12156
+ });
12157
+ };
12158
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(fast || ultrafast) && row("speedMode", t("speedTitle"), speedItems, speed, speed !== "standard" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ForwardRef, {
12159
+ className: "codexModelSelectBolt",
12160
+ "aria-hidden": "true"
12161
+ })), verbosity && row("outputVerbosity", t("verbosityTitle"), verbosityItems, snapshot.outputVerbosity)] });
12162
+ }
12163
+ function CodexModelOptionsOverlay({ optionsMenu }) {
12164
+ const request = (0, react.useSyncExternalStore)(optionsMenu.subscribe, optionsMenu.getSnapshot);
12165
+ return request ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelOptionChoices, {
12166
+ request,
12167
+ close: () => optionsMenu.set(void 0)
12168
+ }, request.field) : null;
12169
+ }
12170
+ function ModelOptionChoices({ request, close }) {
12171
+ const panel = (0, react.useRef)(null);
12172
+ const outside = (0, react.useRef)(null);
12173
+ usePopover(panel, true);
12174
+ useDismissOnOutsidePointer(outside, true, close, panel);
12175
+ (0, react.useLayoutEffect)(() => {
12176
+ const menu = panel.current;
12177
+ (menu.querySelector("[aria-checked=\"true\"]") ?? menu.firstElementChild)?.focus();
12178
+ }, []);
12179
+ const returnToMenu = () => {
12180
+ close();
12181
+ if (!request.trigger.isConnected) return;
12182
+ request.trigger.click();
12183
+ requestAnimationFrame(() => {
12184
+ request.trigger.ownerDocument.getElementById(request.trigger.getAttribute("aria-controls"))?.querySelector(`[data-codex-model-option="${request.field}"]`)?.focus();
12185
+ });
12186
+ };
12187
+ const select = (value) => {
12188
+ close();
12189
+ if (request.trigger.isConnected) {
12190
+ request.trigger.focus();
12191
+ request.select(value);
12192
+ }
12193
+ };
12194
+ const onKeyDown = (event) => {
12195
+ const { key } = event;
12196
+ if (![
12197
+ "Escape",
12198
+ "ArrowLeft",
12199
+ "ArrowUp",
12200
+ "ArrowDown",
12201
+ "Home",
12202
+ "End",
12203
+ "Tab"
12204
+ ].includes(key)) return;
12205
+ event.preventDefault();
12206
+ event.stopPropagation();
12207
+ if (key === "Escape" || key === "ArrowLeft" || key === "Tab" && event.shiftKey) {
12208
+ returnToMenu();
12209
+ return;
12210
+ }
12211
+ if (key === "Tab") {
12212
+ event.target.click();
12213
+ return;
12214
+ }
12215
+ const choices = [...panel.current.children];
12216
+ const index = choices.indexOf(event.target);
12217
+ choices[key === "Home" ? 0 : key === "End" ? choices.length - 1 : (index + (key === "ArrowDown" ? 1 : choices.length - 1)) % choices.length]?.focus();
12218
+ };
12219
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12220
+ ref: panel,
12221
+ popover: "manual",
12222
+ className: "codexModelSelectMenu codexModelOptionsMenu",
12223
+ role: "menu",
12224
+ "aria-label": request.label,
12225
+ style: {
12226
+ right: `min(${request.right}px, max(12px, calc(100vw - ${request.width + 12}px)))`,
12227
+ bottom: `min(${request.bottom}px, max(12px, calc(100dvh - 240px)))`,
12228
+ maxHeight: `min(360px, calc(100dvh - ${request.bottom + 12}px))`,
12229
+ minWidth: 0,
12230
+ width: request.width
12231
+ },
12232
+ onKeyDown,
12233
+ children: request.items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
12234
+ type: "button",
12235
+ role: "menuitemradio",
12236
+ className: "codexModelSelectOption",
12237
+ "aria-checked": item.id === request.value,
12238
+ onClick: () => select(item.id),
12239
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12240
+ className: "codexModelSelectOptionCopy",
12241
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12242
+ className: "codexModelSelectOptionName",
12243
+ children: item.label
12128
12244
  })
12129
- ]
12130
- })]
12131
- })] });
12245
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12246
+ className: "codexModelSelectCheck",
12247
+ children: item.id === request.value && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCheckOutline16, {})
12248
+ })]
12249
+ }, item.id))
12250
+ });
12132
12251
  }
12133
12252
  function CodexModelSelect({ locked, available, directory, load, select, preference, t }) {
12134
12253
  const state = (0, react.useSyncExternalStore)(directory.subscribe, directory.getSnapshot);
@@ -12546,8 +12665,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
12546
12665
  const others = slots.entries(slot).filter((entry) => entry.component !== component);
12547
12666
  const custom = state.composerModelPicker === "legacy" || state.composerModelPicker === "auto" && !state.composerModelPickerConflict && others.every(native);
12548
12667
  const supportsOptions = others.find(native)?.children?.[nativeOptions]?.kind === "list";
12549
- const enabled = state.status === "ready" && custom;
12550
- if (enabled && !supportsOptions && !others.some((entry) => priorityOf(entry) === priority)) dispose ??= slots.register({
12668
+ if (state.status === "ready" && custom && !supportsOptions && !others.some((entry) => priorityOf(entry) === priority)) dispose ??= slots.register({
12551
12669
  name: slot,
12552
12670
  priority,
12553
12671
  inject: props
@@ -12556,7 +12674,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
12556
12674
  dispose?.();
12557
12675
  dispose = void 0;
12558
12676
  }
12559
- if (enabled && supportsOptions && optionsComponent && !others.some((entry) => priorityOf(entry) < 0)) disposeOptions ??= slots.register({
12677
+ if (state.status === "ready" && state.composerModelPicker !== "dsh" && (state.composerModelPicker === "legacy" || others.every(native)) && supportsOptions && optionsComponent && !others.some((entry) => priorityOf(entry) < 0)) disposeOptions ??= slots.register({
12560
12678
  name: nativeOptions,
12561
12679
  id: "codex-subscription",
12562
12680
  inject: props
@@ -12565,7 +12683,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
12565
12683
  disposeOptions?.();
12566
12684
  disposeOptions = void 0;
12567
12685
  }
12568
- preference.setComposerModelPickerActive(Boolean(disposeOptions) || Boolean(dispose) && !others.some((entry) => priorityOf(entry) < priority));
12686
+ preference.setComposerModelPickerActive(Boolean(disposeOptions) && custom || Boolean(dispose) && !others.some((entry) => priorityOf(entry) < priority));
12569
12687
  } catch (error) {
12570
12688
  if (error?.code !== "INACTIVE_EFFECT") throw error;
12571
12689
  } finally {
@@ -21491,6 +21609,12 @@ void main(){
21491
21609
  };
21492
21610
  }, "codex-subscription: preferences and account status");
21493
21611
  const t = ctx.locale.bind(NS);
21612
+ const optionsMenu = createModelOptionsMenu();
21613
+ ctx.slots.inject("shell.overlay", () => ctx.slots.register({
21614
+ name: "shell.overlay",
21615
+ id: "codex-subscription-model-options",
21616
+ inject: () => ({ optionsMenu })
21617
+ }, CodexModelOptionsOverlay));
21494
21618
  ctx.slots.inject("shell.overlay", () => ctx.slots.register({
21495
21619
  name: "shell.overlay",
21496
21620
  id: "codex-subscription-image-viewer",
@@ -21553,6 +21677,7 @@ void main(){
21553
21677
  directory: directory.store,
21554
21678
  preference,
21555
21679
  t,
21680
+ optionsMenu,
21556
21681
  load: () => {
21557
21682
  if (available) directory.load().catch(() => {});
21558
21683
  },
package/lib/index.js CHANGED
@@ -4798,7 +4798,7 @@ function inheritedOriginalImageRef(session, assetId) {
4798
4798
  }
4799
4799
  //#endregion
4800
4800
  //#region src/version.js
4801
- const PACKAGE_VERSION = "3.2.12";
4801
+ const PACKAGE_VERSION = "3.2.13";
4802
4802
  const USER_AGENT = `dsh-codex-subscription/${PACKAGE_VERSION}`;
4803
4803
  //#endregion
4804
4804
  //#region src/codex-images.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-codex-subscription",
3
- "version": "3.2.12",
3
+ "version": "3.2.13",
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",