dsh-codex-subscription 3.2.11 → 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 +4 -4
- package/README.en.md +4 -4
- package/README.es.md +4 -4
- package/README.fr.md +4 -4
- package/README.ja.md +4 -4
- package/README.md +4 -4
- package/README.pt.md +4 -4
- package/README.ru.md +4 -4
- package/README.zh-CN.md +4 -4
- package/lib/client.js +219 -6
- package/lib/index.js +78 -62
- package/package.json +1 -1
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.11
|
|
|
112
112
|
Web でサインインし、Codex モデルを選択した後、Headless プロファイルにも同じプラグインをインストールします。
|
|
113
113
|
|
|
114
114
|
```sh
|
|
115
|
-
dsh plugin --profile headless add dsh-codex-subscription@3.2.
|
|
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.
|
|
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.
|
|
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.
|
|
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.11
|
|
|
104
104
|
先在 Web 中完成登录并选择一次 Codex 模型,再把同一个插件安装到 Headless profile:
|
|
105
105
|
|
|
106
106
|
```sh
|
|
107
|
-
dsh plugin --profile headless add dsh-codex-subscription@3.2.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.11
|
|
|
112
112
|
Войдите в систему и выберите модель Codex в Web, затем установите тот же плагин в профиле Headless:
|
|
113
113
|
|
|
114
114
|
```sh
|
|
115
|
-
dsh plugin --profile headless add dsh-codex-subscription@3.2.
|
|
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.
|
|
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.
|
|
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.
|
|
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.11
|
|
|
104
104
|
先在 Web 中完成登录并选择一次 Codex 模型,再把同一个插件安装到 Headless profile:
|
|
105
105
|
|
|
106
106
|
```sh
|
|
107
|
-
dsh plugin --profile headless add dsh-codex-subscription@3.2.
|
|
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.
|
|
371
|
+
dsh plugin --profile web update dsh-codex-subscription@3.2.13
|
|
372
372
|
```
|
|
373
373
|
|
|
374
374
|
仅在需要卸载时运行:
|
package/lib/client.js
CHANGED
|
@@ -9604,8 +9604,10 @@ window.__ModuleLoader__.load({
|
|
|
9604
9604
|
.codexModelSelectChevron{flex:none;color:var(--dsw-alias-label-caption);transition:transform 120ms}
|
|
9605
9605
|
.codexModelSelectTrigger[aria-expanded=true] .codexModelSelectChevron{transform:rotate(180deg)}
|
|
9606
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}
|
|
9607
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}
|
|
9608
|
-
.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}
|
|
9609
9611
|
.codexModelSelectCellLabel{flex:none;white-space:nowrap}
|
|
9610
9612
|
.codexModelSelectCellValue{flex:auto;min-width:0;overflow:hidden;color:var(--dsw-alias-label-tertiary);text-align:right;text-overflow:ellipsis;white-space:nowrap}
|
|
9611
9613
|
.codexModelSelectCellChevron{flex:none;width:12px;height:12px;color:var(--dsw-alias-menu-icon)}
|
|
@@ -11671,7 +11673,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
11671
11673
|
}
|
|
11672
11674
|
//#endregion
|
|
11673
11675
|
//#region src/version.js
|
|
11674
|
-
const PACKAGE_VERSION = "3.2.
|
|
11676
|
+
const PACKAGE_VERSION = "3.2.13";
|
|
11675
11677
|
//#endregion
|
|
11676
11678
|
//#region src/client-recovery.js
|
|
11677
11679
|
async function recoveryCall(rpc, endpoint, payload = {}, timeoutMs = endpoint === "usage" || endpoint.startsWith("usage/") ? 3e4 : 1e4) {
|
|
@@ -12056,6 +12058,197 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
12056
12058
|
const ForwardRef = /*#__PURE__*/ react.forwardRef(BoltIcon);
|
|
12057
12059
|
//#endregion
|
|
12058
12060
|
//#region src/client-model-select.jsx
|
|
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 }) {
|
|
12077
|
+
const { current } = (0, react.useSyncExternalStore)(directory.subscribe, directory.getSnapshot);
|
|
12078
|
+
const snapshot = usePreferenceSnapshot(preference);
|
|
12079
|
+
if (current?.provider !== "openai-codex") return null;
|
|
12080
|
+
const fast = snapshot.fastModels?.includes(current.model) ?? supportsCodexFastMode(current.model);
|
|
12081
|
+
const ultrafast = snapshot.ultrafastModels?.includes(current.model) ?? false;
|
|
12082
|
+
const verbosity = snapshot.verbosityModels.includes(current.model);
|
|
12083
|
+
const speed = effectiveCodexSpeedMode(snapshot.speedMode, current.model, {
|
|
12084
|
+
supportsFast: fast,
|
|
12085
|
+
supportsUltrafast: ultrafast
|
|
12086
|
+
});
|
|
12087
|
+
const disabled = locked || snapshot.status !== "ready" || !snapshot.writable || snapshot.saving;
|
|
12088
|
+
const change = async (field, value) => {
|
|
12089
|
+
const model = directory.getSnapshot().current;
|
|
12090
|
+
if (model?.provider !== current.provider || model.model !== current.model) return;
|
|
12091
|
+
await preference.set({ [field]: value });
|
|
12092
|
+
if (preference.getSnapshot().error) reportFailure(t("preferenceFailed"));
|
|
12093
|
+
};
|
|
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,
|
|
12136
|
+
disabled,
|
|
12137
|
+
onClick: open,
|
|
12138
|
+
onKeyDown: (event) => {
|
|
12139
|
+
if (event.key !== "ArrowRight") return;
|
|
12140
|
+
event.preventDefault();
|
|
12141
|
+
event.stopPropagation();
|
|
12142
|
+
open(event);
|
|
12143
|
+
},
|
|
12144
|
+
children: [
|
|
12145
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12146
|
+
className: "codexModelSelectCellLabel",
|
|
12147
|
+
children: label
|
|
12148
|
+
}),
|
|
12149
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12150
|
+
className: "codexModelSelectCellValue",
|
|
12151
|
+
children: items.find((item) => item.id === value)?.label ?? items[0].label
|
|
12152
|
+
}),
|
|
12153
|
+
icon,
|
|
12154
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronRightOutline14, { className: "codexModelSelectCellChevron" })
|
|
12155
|
+
]
|
|
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
|
|
12244
|
+
})
|
|
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
|
+
});
|
|
12251
|
+
}
|
|
12059
12252
|
function CodexModelSelect({ locked, available, directory, load, select, preference, t }) {
|
|
12060
12253
|
const state = (0, react.useSyncExternalStore)(directory.subscribe, directory.getSnapshot);
|
|
12061
12254
|
const preferenceSnapshot = usePreferenceSnapshot(preference);
|
|
@@ -12429,6 +12622,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
12429
12622
|
//#region src/client-model-picker-slot.js
|
|
12430
12623
|
const slot = "conversation.input.model";
|
|
12431
12624
|
const nativeLabel = "conversation.input.model.label";
|
|
12625
|
+
const nativeOptions = "conversation.input.model.options";
|
|
12432
12626
|
const priority = -1;
|
|
12433
12627
|
const priorityOf = (entry) => entry.options.priority ?? 0;
|
|
12434
12628
|
const native = (entry) => priorityOf(entry) === 0 && entry.children?.[nativeLabel]?.kind === "single";
|
|
@@ -12457,9 +12651,10 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
12457
12651
|
update(false);
|
|
12458
12652
|
};
|
|
12459
12653
|
}
|
|
12460
|
-
function registerLegacyModelPicker(slots, preference, props, component) {
|
|
12654
|
+
function registerLegacyModelPicker(slots, preference, props, component, optionsComponent) {
|
|
12461
12655
|
return slots.inject(slot, () => {
|
|
12462
12656
|
let dispose;
|
|
12657
|
+
let disposeOptions;
|
|
12463
12658
|
let disposed = false;
|
|
12464
12659
|
let syncing = false;
|
|
12465
12660
|
const sync = () => {
|
|
@@ -12469,7 +12664,8 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
12469
12664
|
const state = preference.getSnapshot();
|
|
12470
12665
|
const others = slots.entries(slot).filter((entry) => entry.component !== component);
|
|
12471
12666
|
const custom = state.composerModelPicker === "legacy" || state.composerModelPicker === "auto" && !state.composerModelPickerConflict && others.every(native);
|
|
12472
|
-
|
|
12667
|
+
const supportsOptions = others.find(native)?.children?.[nativeOptions]?.kind === "list";
|
|
12668
|
+
if (state.status === "ready" && custom && !supportsOptions && !others.some((entry) => priorityOf(entry) === priority)) dispose ??= slots.register({
|
|
12473
12669
|
name: slot,
|
|
12474
12670
|
priority,
|
|
12475
12671
|
inject: props
|
|
@@ -12478,7 +12674,16 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
12478
12674
|
dispose?.();
|
|
12479
12675
|
dispose = void 0;
|
|
12480
12676
|
}
|
|
12481
|
-
|
|
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({
|
|
12678
|
+
name: nativeOptions,
|
|
12679
|
+
id: "codex-subscription",
|
|
12680
|
+
inject: props
|
|
12681
|
+
}, optionsComponent);
|
|
12682
|
+
else {
|
|
12683
|
+
disposeOptions?.();
|
|
12684
|
+
disposeOptions = void 0;
|
|
12685
|
+
}
|
|
12686
|
+
preference.setComposerModelPickerActive(Boolean(disposeOptions) && custom || Boolean(dispose) && !others.some((entry) => priorityOf(entry) < priority));
|
|
12482
12687
|
} catch (error) {
|
|
12483
12688
|
if (error?.code !== "INACTIVE_EFFECT") throw error;
|
|
12484
12689
|
} finally {
|
|
@@ -12493,6 +12698,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
12493
12698
|
unwatch();
|
|
12494
12699
|
unwatchSlot();
|
|
12495
12700
|
dispose?.();
|
|
12701
|
+
disposeOptions?.();
|
|
12496
12702
|
preference.setComposerModelPickerActive(false);
|
|
12497
12703
|
};
|
|
12498
12704
|
});
|
|
@@ -21403,6 +21609,12 @@ void main(){
|
|
|
21403
21609
|
};
|
|
21404
21610
|
}, "codex-subscription: preferences and account status");
|
|
21405
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));
|
|
21406
21618
|
ctx.slots.inject("shell.overlay", () => ctx.slots.register({
|
|
21407
21619
|
name: "shell.overlay",
|
|
21408
21620
|
id: "codex-subscription-image-viewer",
|
|
@@ -21465,6 +21677,7 @@ void main(){
|
|
|
21465
21677
|
directory: directory.store,
|
|
21466
21678
|
preference,
|
|
21467
21679
|
t,
|
|
21680
|
+
optionsMenu,
|
|
21468
21681
|
load: () => {
|
|
21469
21682
|
if (available) directory.load().catch(() => {});
|
|
21470
21683
|
},
|
|
@@ -21477,7 +21690,7 @@ void main(){
|
|
|
21477
21690
|
}
|
|
21478
21691
|
}
|
|
21479
21692
|
};
|
|
21480
|
-
}, CodexModelSelect);
|
|
21693
|
+
}, CodexModelSelect, CodexNativeModelOptions);
|
|
21481
21694
|
};
|
|
21482
21695
|
if (ctx.get("remote.session") === void 0) installDirectorySlots(ctx);
|
|
21483
21696
|
else ctx.inject(["remote.session"], installDirectorySlots);
|
package/lib/index.js
CHANGED
|
@@ -1167,6 +1167,7 @@ const routes$1 = /* @__PURE__ */ new Set([
|
|
|
1167
1167
|
"system",
|
|
1168
1168
|
"bypass",
|
|
1169
1169
|
"proxy",
|
|
1170
|
+
"model-proxy",
|
|
1170
1171
|
"unknown"
|
|
1171
1172
|
]);
|
|
1172
1173
|
const phases = /* @__PURE__ */ new Set([
|
|
@@ -1289,6 +1290,7 @@ const routes = /* @__PURE__ */ new Set([
|
|
|
1289
1290
|
"system",
|
|
1290
1291
|
"bypass",
|
|
1291
1292
|
"proxy",
|
|
1293
|
+
"model-proxy",
|
|
1292
1294
|
"unknown"
|
|
1293
1295
|
]);
|
|
1294
1296
|
const elapsedBuckets = /* @__PURE__ */ new Set([
|
|
@@ -1463,6 +1465,8 @@ const diagnosticLog = createDiagnosticLog();
|
|
|
1463
1465
|
const execFileAsync = promisify(execFile);
|
|
1464
1466
|
const CODEX_AUTH_HOST = "auth.openai.com";
|
|
1465
1467
|
const CODEX_SUBSCRIPTION_HOST = "chatgpt.com";
|
|
1468
|
+
const CODEX_MODEL_SSE_PATH = "/backend-api/codex/responses";
|
|
1469
|
+
const MODEL_SSE_PROXY_ENV = "DSH_CODEX_SSE_PROXY";
|
|
1466
1470
|
const CODEX_HOSTS = /* @__PURE__ */ new Set([CODEX_AUTH_HOST, CODEX_SUBSCRIPTION_HOST]);
|
|
1467
1471
|
const OAUTH_HOSTS = /* @__PURE__ */ new Set([CODEX_AUTH_HOST]);
|
|
1468
1472
|
const networkScope = new AsyncLocalStorage();
|
|
@@ -1678,21 +1682,30 @@ async function fetchInCodexScope(scope, fetchBeforeScope, input, init) {
|
|
|
1678
1682
|
const proxyFetch = scopedOptions.fetchThroughProxy ?? fetchThroughProxy;
|
|
1679
1683
|
const target = new URL(typeof input === "string" || input instanceof URL ? input : input.url);
|
|
1680
1684
|
if (target.protocol !== "https:" || !allowedHosts.has(target.hostname)) return fetchBeforeScope(input, init);
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1685
|
+
const dedicatedProxy = target.origin === `https://${CODEX_SUBSCRIPTION_HOST}` && target.pathname === CODEX_MODEL_SSE_PATH ? scopedOptions.modelSseProxy : void 0;
|
|
1686
|
+
let route;
|
|
1687
|
+
if (dedicatedProxy) route = {
|
|
1688
|
+
url: normalizeProxy(dedicatedProxy),
|
|
1689
|
+
source: "model-proxy"
|
|
1690
|
+
};
|
|
1691
|
+
else {
|
|
1692
|
+
let proxy = resolved.get(target.hostname);
|
|
1693
|
+
if (proxy === void 0) {
|
|
1694
|
+
proxy = resolveCodexProxy({
|
|
1695
|
+
...scopedOptions,
|
|
1696
|
+
target
|
|
1697
|
+
});
|
|
1698
|
+
resolved.set(target.hostname, proxy);
|
|
1699
|
+
}
|
|
1700
|
+
route = await proxy;
|
|
1688
1701
|
}
|
|
1689
|
-
const route = await proxy;
|
|
1690
1702
|
scopedOptions.onRoute?.(route.source);
|
|
1691
1703
|
try {
|
|
1692
1704
|
scopedOptions.onTransport?.("sse");
|
|
1693
1705
|
} catch {}
|
|
1694
1706
|
let response;
|
|
1695
1707
|
try {
|
|
1708
|
+
if (dedicatedProxy && !route.url) throw new TypeError("Invalid DSH_CODEX_SSE_PROXY. Use an HTTP or HTTPS CONNECT proxy.");
|
|
1696
1709
|
response = await (route.url === void 0 && !scopedOptions.standardHttps ? fetchBeforeScope(input, init) : proxyFetch(input, init, route.url));
|
|
1697
1710
|
} catch (error) {
|
|
1698
1711
|
try {
|
|
@@ -1798,6 +1811,7 @@ function createCodexNetworkTransport(options = {}) {
|
|
|
1798
1811
|
};
|
|
1799
1812
|
const value = await withCodexNetwork(operation, {
|
|
1800
1813
|
...scoped,
|
|
1814
|
+
modelSseProxy: area === "model" && connection.requestFetch === true ? (scoped.env ?? process.env)[MODEL_SSE_PROXY_ENV]?.trim() : void 0,
|
|
1801
1815
|
onRoute: (source) => {
|
|
1802
1816
|
route = source;
|
|
1803
1817
|
routed = true;
|
|
@@ -3835,6 +3849,48 @@ function authenticatedSubagentChild(child, { Transport, getTokens, thread, signa
|
|
|
3835
3849
|
} });
|
|
3836
3850
|
}
|
|
3837
3851
|
//#endregion
|
|
3852
|
+
//#region src/dsh-compatibility.js
|
|
3853
|
+
const VERSION_RE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z.-]+))?$/;
|
|
3854
|
+
function parseVersion(version) {
|
|
3855
|
+
const match = VERSION_RE.exec(version);
|
|
3856
|
+
if (match === null) throw new Error(`invalid semantic version: ${version}`);
|
|
3857
|
+
return {
|
|
3858
|
+
core: match.slice(1, 4).map(Number),
|
|
3859
|
+
prerelease: match[4]?.split(".").map((value) => /^\d+$/.test(value) ? Number(value) : value) ?? []
|
|
3860
|
+
};
|
|
3861
|
+
}
|
|
3862
|
+
function compareVersions(left, right) {
|
|
3863
|
+
const a = parseVersion(left);
|
|
3864
|
+
const b = parseVersion(right);
|
|
3865
|
+
for (let index = 0; index < 3; index += 1) if (a.core[index] !== b.core[index]) return a.core[index] - b.core[index];
|
|
3866
|
+
if (a.prerelease.length === 0 || b.prerelease.length === 0) return a.prerelease.length === b.prerelease.length ? 0 : a.prerelease.length === 0 ? 1 : -1;
|
|
3867
|
+
const length = Math.max(a.prerelease.length, b.prerelease.length);
|
|
3868
|
+
for (let index = 0; index < length; index += 1) {
|
|
3869
|
+
const av = a.prerelease[index];
|
|
3870
|
+
const bv = b.prerelease[index];
|
|
3871
|
+
if (av === void 0 || bv === void 0) return av === bv ? 0 : av === void 0 ? -1 : 1;
|
|
3872
|
+
if (av === bv) continue;
|
|
3873
|
+
if (typeof av === "number" && typeof bv === "number") return av - bv;
|
|
3874
|
+
if (typeof av === "number") return -1;
|
|
3875
|
+
if (typeof bv === "number") return 1;
|
|
3876
|
+
return av.localeCompare(bv);
|
|
3877
|
+
}
|
|
3878
|
+
return 0;
|
|
3879
|
+
}
|
|
3880
|
+
function dshCompatibilityRange(manifest) {
|
|
3881
|
+
const range = manifest?.engines?.dsh ?? manifest?.peerDependencies?.["@deepseek-ai/dsh-llm"];
|
|
3882
|
+
return typeof range === "string" ? range : "";
|
|
3883
|
+
}
|
|
3884
|
+
function declaresDshCompatibility(manifest, version) {
|
|
3885
|
+
if (typeof version !== "string" || !VERSION_RE.test(version)) return false;
|
|
3886
|
+
return dshCompatibilityRange(manifest).split("||").some((term) => {
|
|
3887
|
+
const clause = term.trim();
|
|
3888
|
+
if (clause === version) return true;
|
|
3889
|
+
const interval = /^>=(\S+) <(\S+)$/u.exec(clause);
|
|
3890
|
+
return interval !== null && interval.slice(1).every((bound) => VERSION_RE.test(bound)) && compareVersions(version, interval[1]) >= 0 && compareVersions(version, interval[2]) < 0;
|
|
3891
|
+
});
|
|
3892
|
+
}
|
|
3893
|
+
//#endregion
|
|
3838
3894
|
//#region src/subagent-cli.js
|
|
3839
3895
|
const SUBAGENT_CLI_ALIAS = "dsh-codex-subtask-cli";
|
|
3840
3896
|
const SUBAGENT_CODEX_VERSION = "0.167.0";
|
|
@@ -3929,48 +3985,6 @@ function createSubagentCli({ profile, loadOperations = async (value) => {
|
|
|
3929
3985
|
};
|
|
3930
3986
|
}
|
|
3931
3987
|
//#endregion
|
|
3932
|
-
//#region src/dsh-compatibility.js
|
|
3933
|
-
const VERSION_RE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z.-]+))?$/;
|
|
3934
|
-
function parseVersion(version) {
|
|
3935
|
-
const match = VERSION_RE.exec(version);
|
|
3936
|
-
if (match === null) throw new Error(`invalid semantic version: ${version}`);
|
|
3937
|
-
return {
|
|
3938
|
-
core: match.slice(1, 4).map(Number),
|
|
3939
|
-
prerelease: match[4]?.split(".").map((value) => /^\d+$/.test(value) ? Number(value) : value) ?? []
|
|
3940
|
-
};
|
|
3941
|
-
}
|
|
3942
|
-
function compareVersions(left, right) {
|
|
3943
|
-
const a = parseVersion(left);
|
|
3944
|
-
const b = parseVersion(right);
|
|
3945
|
-
for (let index = 0; index < 3; index += 1) if (a.core[index] !== b.core[index]) return a.core[index] - b.core[index];
|
|
3946
|
-
if (a.prerelease.length === 0 || b.prerelease.length === 0) return a.prerelease.length === b.prerelease.length ? 0 : a.prerelease.length === 0 ? 1 : -1;
|
|
3947
|
-
const length = Math.max(a.prerelease.length, b.prerelease.length);
|
|
3948
|
-
for (let index = 0; index < length; index += 1) {
|
|
3949
|
-
const av = a.prerelease[index];
|
|
3950
|
-
const bv = b.prerelease[index];
|
|
3951
|
-
if (av === void 0 || bv === void 0) return av === bv ? 0 : av === void 0 ? -1 : 1;
|
|
3952
|
-
if (av === bv) continue;
|
|
3953
|
-
if (typeof av === "number" && typeof bv === "number") return av - bv;
|
|
3954
|
-
if (typeof av === "number") return -1;
|
|
3955
|
-
if (typeof bv === "number") return 1;
|
|
3956
|
-
return av.localeCompare(bv);
|
|
3957
|
-
}
|
|
3958
|
-
return 0;
|
|
3959
|
-
}
|
|
3960
|
-
function dshCompatibilityRange(manifest) {
|
|
3961
|
-
const range = manifest?.engines?.dsh ?? manifest?.peerDependencies?.["@deepseek-ai/dsh-llm"];
|
|
3962
|
-
return typeof range === "string" ? range : "";
|
|
3963
|
-
}
|
|
3964
|
-
function declaresDshCompatibility(manifest, version) {
|
|
3965
|
-
if (typeof version !== "string" || !VERSION_RE.test(version)) return false;
|
|
3966
|
-
return dshCompatibilityRange(manifest).split("||").some((term) => {
|
|
3967
|
-
const clause = term.trim();
|
|
3968
|
-
if (clause === version) return true;
|
|
3969
|
-
const interval = /^>=(\S+) <(\S+)$/u.exec(clause);
|
|
3970
|
-
return interval !== null && interval.slice(1).every((bound) => VERSION_RE.test(bound)) && compareVersions(version, interval[1]) >= 0 && compareVersions(version, interval[2]) < 0;
|
|
3971
|
-
});
|
|
3972
|
-
}
|
|
3973
|
-
//#endregion
|
|
3974
3988
|
//#region src/subagent-runtime.js
|
|
3975
3989
|
const SUBAGENT_RUNTIME_PACKAGE = "@deepseek-ai/dsh-subagent-codex";
|
|
3976
3990
|
const require = createRequire(import.meta.url);
|
|
@@ -4226,25 +4240,26 @@ function subagentConfigListener(switcher) {
|
|
|
4226
4240
|
};
|
|
4227
4241
|
}
|
|
4228
4242
|
/** Change only standard independent spawn tools; leave fork/custom tools untouched. */
|
|
4229
|
-
function createSubagentBackendSwitcher({ entries, prepare, persist }) {
|
|
4243
|
+
function createSubagentBackendSwitcher({ entries, prepare, persist, hostVersion }) {
|
|
4230
4244
|
const originals = /* @__PURE__ */ new Map();
|
|
4231
4245
|
let selected = "dsh";
|
|
4232
4246
|
let tail = Promise.resolve();
|
|
4233
4247
|
let disposed = false;
|
|
4234
4248
|
const standard = (entry, config) => entry?.options?.name === "@deepseek-ai/dsh-tool-subagent" && config?.provider === "spawn" && !config.agentOptions && !config.persona && !config.toolFilter;
|
|
4235
|
-
const
|
|
4236
|
-
|
|
4249
|
+
const modernSelection = hostVersion !== void 0 && compareVersions(hostVersion, "0.2.2-alpha.2") >= 0;
|
|
4250
|
+
const childRoute = {
|
|
4237
4251
|
provider: SUBAGENT_PROVIDER,
|
|
4238
|
-
|
|
4239
|
-
|
|
4252
|
+
...modernSelection ? { modelSelection: true } : {
|
|
4253
|
+
modelSelectionSettings: true,
|
|
4254
|
+
backgroundMode: "one-shot"
|
|
4255
|
+
},
|
|
4240
4256
|
maxDepth: "provider-managed"
|
|
4257
|
+
};
|
|
4258
|
+
const convert = (config) => ({
|
|
4259
|
+
...config,
|
|
4260
|
+
...childRoute
|
|
4241
4261
|
});
|
|
4242
|
-
const ownedFields =
|
|
4243
|
-
"provider",
|
|
4244
|
-
"modelSelectionSettings",
|
|
4245
|
-
"backgroundMode",
|
|
4246
|
-
"maxDepth"
|
|
4247
|
-
];
|
|
4262
|
+
const ownedFields = Object.keys(childRoute);
|
|
4248
4263
|
const restore = (current, original) => {
|
|
4249
4264
|
const result = { ...current }, applied = convert(original);
|
|
4250
4265
|
for (const key of ownedFields) {
|
|
@@ -4783,7 +4798,7 @@ function inheritedOriginalImageRef(session, assetId) {
|
|
|
4783
4798
|
}
|
|
4784
4799
|
//#endregion
|
|
4785
4800
|
//#region src/version.js
|
|
4786
|
-
const PACKAGE_VERSION = "3.2.
|
|
4801
|
+
const PACKAGE_VERSION = "3.2.13";
|
|
4787
4802
|
const USER_AGENT = `dsh-codex-subscription/${PACKAGE_VERSION}`;
|
|
4788
4803
|
//#endregion
|
|
4789
4804
|
//#region src/codex-images.js
|
|
@@ -17943,6 +17958,7 @@ function apply(ctx, config = {}) {
|
|
|
17943
17958
|
const switcher = createSubagentBackendSwitcher({
|
|
17944
17959
|
entries: () => [...scoped.loader.entries(), ...presetEntries(scoped)],
|
|
17945
17960
|
prepare: instance.prepare,
|
|
17961
|
+
hostVersion: hostDshVersion(),
|
|
17946
17962
|
persist: (mode) => settings.update({ subagentBackend: mode })
|
|
17947
17963
|
});
|
|
17948
17964
|
const unconfigure = scoped.on("internal/config", subagentConfigListener(switcher), { global: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-codex-subscription",
|
|
3
|
-
"version": "3.2.
|
|
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",
|