dsh-chatgpt-sub 0.0.0-stage → 0.5.3
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/LICENSE +21 -0
- package/README.md +68 -2
- package/README.zh-CN.md +69 -0
- package/cordis.patch.yml +15 -0
- package/docs/INSTALL.md +149 -0
- package/lib/client.js +625 -0
- package/lib/index.js +1201 -0
- package/lib/locales.js +1 -0
- package/lib/self-update.js +591 -0
- package/lib/version.js +40 -0
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/hi.json +6 -0
- package/locale/id.json +6 -0
- package/locale/it.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/ko.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh-hant.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +54 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SONGOAO25
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,69 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ChatGPT Subscription
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**English** | [**中文**](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
[](https://github.com/SONGOAO25/dsh-chatgpt-sub/blob/main/LICENSE)
|
|
6
|
+
[](https://github.com/SONGOAO25/dsh-chatgpt-sub/releases)
|
|
7
|
+
|
|
8
|
+
A DeepSeek Harness plugin that connects your ChatGPT account through OpenAI's sign-in page and lets you use the account's available ChatGPT models inside DSH. You need a plan that includes Codex access and sufficient subscription quota.
|
|
9
|
+
|
|
10
|
+
## What it does
|
|
11
|
+
|
|
12
|
+
Sign in from the plugin page, then select a model under the **ChatGPT** provider. The plugin maintains the sign-in and shows account status, expiry, and **Sign in again / Unbind** actions. Available models depend on your account and DSH's model support.
|
|
13
|
+
|
|
14
|
+
The companion [Bottom Info Bar](https://github.com/songoao25/dsh-bottom-info-bar) displays available quota windows and reset times. Both plugins can be installed independently; ChatGPT quota display needs a valid sign-in.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
Recommended: open **Plugins → Add plugin** in DSH and enter the package name:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
dsh-chatgpt-sub
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Prefer the terminal? For a CLI web profile:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
dsh plugin --profile web add dsh-chatgpt-sub
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Installing from the repository also works — `lib/` is committed, so that path needs no build:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
https://github.com/SONGOAO25/dsh-chatgpt-sub
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Then **restart DSH**. Refreshing the page is not enough. In the desktop app, use **Plugins → Add plugin**; its profile is managed by the app and cannot be installed into through the CLI. DSH uses pnpm to install plugins; the package ships its built files and requires no installation build.
|
|
37
|
+
|
|
38
|
+
The package has been public on npm since 2026-10-13 (0.5.1). If the package name cannot be resolved, fall back to the repository address.
|
|
39
|
+
|
|
40
|
+
Local installs, Windows guidance, updating and troubleshooting: [docs/INSTALL.md](docs/INSTALL.md).
|
|
41
|
+
|
|
42
|
+
## Settings
|
|
43
|
+
|
|
44
|
+
Open **Plugins → ChatGPT Subscription** and choose **Sign in with ChatGPT**. Complete authorization in the browser; when the page shows **Connected**, select a ChatGPT model in the conversation model picker. Allow DSH pop-ups if the authorization page does not open.
|
|
45
|
+
|
|
46
|
+
**Sign in again** renews the binding. **Unbind** disconnects the account from this plugin. An existing Codex CLI sign-in is not automatically adopted by the plugin.
|
|
47
|
+
|
|
48
|
+
## Sign-in data and updates
|
|
49
|
+
|
|
50
|
+
Authorization and model requests communicate with official OpenAI endpoints. Sign-in tokens are saved in the standard local `~/.codex/auth.json` file with owner-only permissions and synchronized into DSH's credential store. Signing in can update that shared file, so it can affect which account Codex CLI uses. Tokens are transmitted to OpenAI for authorized requests; they are not written to plugin logs.
|
|
51
|
+
|
|
52
|
+
Unbinding and uninstalling preserve `~/.codex/auth.json` and remove the plugin's binding and managed DSH entries. The plugin refreshes sign-in automatically. Under **Version and updates**, automatic updates (default) check npm when DSH starts, verify and replace the plugin files, then take effect after a restart. Manual mode checks without installing; installation asks for confirmation. Failed updates restore the previous files, and settings offer rollback when needed. Sign-in data is preserved. Local checkout and linked installs require a code update and rebuild; see [docs/INSTALL.md](docs/INSTALL.md). Updates become available after the npm package is published.
|
|
53
|
+
|
|
54
|
+
Remove the plugin from the desktop app's **Plugins** page, or use `dsh plugin --profile web remove dsh-chatgpt-sub` for the CLI web profile. Do not include sign-in files, credentials, or account details in bug reports.
|
|
55
|
+
|
|
56
|
+
## Languages
|
|
57
|
+
|
|
58
|
+
The plugin includes English, Simplified and Traditional Chinese, Japanese, Korean, Spanish, Portuguese, French, German, Italian, Russian, Hindi and Indonesian. It follows DSH’s language by default. Choose **Language** on this plugin’s settings page to use a different language independently; the choice is saved in this browser. Regional variants such as Spanish (Mexico) and Portuguese (Brazil) use the corresponding built-in language. Unsupported languages fall back to English.
|
|
59
|
+
|
|
60
|
+
## Development
|
|
61
|
+
|
|
62
|
+
- Build: `npm run build`
|
|
63
|
+
- Test: `node tests/run-all.mjs`
|
|
64
|
+
- Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
65
|
+
- Security reports: [SECURITY.md](SECURITY.md)
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
[MIT](LICENSE) © 2026 SONGOAO25
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# ChatGPT 订阅
|
|
2
|
+
|
|
3
|
+
[**English**](README.md) | **中文**
|
|
4
|
+
|
|
5
|
+
[](https://github.com/SONGOAO25/dsh-chatgpt-sub/blob/main/LICENSE)
|
|
6
|
+
[](https://github.com/SONGOAO25/dsh-chatgpt-sub/releases)
|
|
7
|
+
|
|
8
|
+
一个 DeepSeek Harness 插件:通过 OpenAI 登录页面连接 ChatGPT 账号,在 DSH 中使用该账号可用的 ChatGPT 模型。需要包含 Codex 使用权限的套餐和足够的订阅额度。
|
|
9
|
+
|
|
10
|
+
## 功能
|
|
11
|
+
|
|
12
|
+
在插件页登录,再选择提供商 **ChatGPT** 下的模型即可对话。插件自动维护登录状态,并显示账号、有效期以及「重新绑定 / 解绑」操作。可用模型取决于账号套餐和 DSH 的模型支持。
|
|
13
|
+
|
|
14
|
+
配套的[底部信息栏](https://github.com/songoao25/dsh-bottom-info-bar)显示可读取的额度窗口与重置时间。两个插件可以分别安装;ChatGPT 额度显示需要有效登录。
|
|
15
|
+
|
|
16
|
+
## 安装
|
|
17
|
+
|
|
18
|
+
推荐:打开 DSH **插件 → 添加插件**,填包名:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
dsh-chatgpt-sub
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
使用命令行启动的网页端,也可以执行:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
dsh plugin --profile web add dsh-chatgpt-sub
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
也可以填仓库地址 —— 仓库已包含构建文件,填地址安装无需构建:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
https://github.com/SONGOAO25/dsh-chatgpt-sub
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
装完**重启 DSH**,只刷新页面不够。桌面客户端请使用 **插件 → 添加插件**;它的配置由客户端管理,不能通过命令行安装。DSH 使用 pnpm 安装插件;包已包含构建文件,安装时无需构建。
|
|
37
|
+
|
|
38
|
+
npm 上的 `dsh-chatgpt-sub` 自 2026-10-13(0.5.1)起公开可装。包名解析不到时,改用上面的仓库地址。
|
|
39
|
+
|
|
40
|
+
本地安装、Windows 说明、更新与故障排查见 [docs/INSTALL.md](docs/INSTALL.md)。
|
|
41
|
+
|
|
42
|
+
## 设置
|
|
43
|
+
|
|
44
|
+
进入 **插件 → ChatGPT 订阅**,点击「绑定 ChatGPT 账号」,在浏览器中完成授权。页面显示「已连接」后,在对话的模型选择器中选择 ChatGPT 模型。如果授权页面没有打开,请允许 DSH 的弹窗。
|
|
45
|
+
|
|
46
|
+
「重新绑定」重新完成账号授权;「解绑」断开该账号与本插件的连接。插件不会自动使用已有的 Codex CLI 登录。
|
|
47
|
+
|
|
48
|
+
## 登录信息与更新
|
|
49
|
+
|
|
50
|
+
授权和模型请求与 OpenAI 官方服务通信。登录信息保存在本机标准位置 `~/.codex/auth.json`,只有文件所有者可读写,并同步到 DSH 的凭据库。绑定会更新这个共用文件,因此可能改变 Codex CLI 使用的账号。登录信息会随授权请求传给 OpenAI,不写入插件日志。
|
|
51
|
+
|
|
52
|
+
解绑和卸载保留 `~/.codex/auth.json`,清除本插件的绑定和它管理的 DSH 条目。插件自动续期登录。**版本与更新**中,自动更新(默认)在 DSH 启动时检查 npm,校验并替换插件文件,重启后生效;手动模式只检查,安装前需要确认。更新失败会恢复旧文件,需要时可在设置中回滚。登录信息会保留。本地副本和链接安装需要更新代码并重新构建,见 [docs/INSTALL.md](docs/INSTALL.md)。npm 包发布后才能获取更新。
|
|
53
|
+
|
|
54
|
+
桌面客户端在 **插件** 页卸载;命令行网页端使用 `dsh plugin --profile web remove dsh-chatgpt-sub`。报告问题时,不要附登录文件、凭据或真实账号信息。
|
|
55
|
+
|
|
56
|
+
## 语言
|
|
57
|
+
|
|
58
|
+
插件内置简体中文、繁体中文、英语、日语、韩语、西班牙语、葡萄牙语、法语、德语、意大利语、俄语、印地语和印度尼西亚语。默认跟随 DSH 的语言;也可以在本插件设置页的**语言**中单独选择,选择会保存在当前浏览器。墨西哥西班牙语、巴西葡萄牙语等地区变体使用对应的内置语言;不支持的语言显示英语。
|
|
59
|
+
|
|
60
|
+
## 开发
|
|
61
|
+
|
|
62
|
+
- 构建:`npm run build`
|
|
63
|
+
- 测试:`node tests/run-all.mjs`
|
|
64
|
+
- 贡献指南:[CONTRIBUTING.md](CONTRIBUTING.md)
|
|
65
|
+
- 安全问题:[SECURITY.md](SECURITY.md)
|
|
66
|
+
|
|
67
|
+
## 许可证
|
|
68
|
+
|
|
69
|
+
[MIT](LICENSE) © 2026 SONGOAO25
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# dsh-chatgpt-sub bundle patch: mounts the plugin into a profile layer stack.
|
|
2
|
+
# The row id is the key users override in their profile's cordis.patch.yml; the row name
|
|
3
|
+
# is the module this package exports, so it must stay the package name.
|
|
4
|
+
# Keep the two different: DSH's plugin card prints the row id and the module name on
|
|
5
|
+
# separate lines (skipping one only when it equals the row title), so an id equal to the
|
|
6
|
+
# module name renders the same string twice. Official bundles do the same, e.g.
|
|
7
|
+
# 'agent-team' + '@deepseek-ai/dsh-experimental-agent-team'.
|
|
8
|
+
- insert:
|
|
9
|
+
- id: chatgpt-subscription
|
|
10
|
+
name: 'dsh-chatgpt-sub'
|
|
11
|
+
|
|
12
|
+
# This plugin owns only ChatGPT subscription OAuth binding, token upkeep, and the
|
|
13
|
+
# openai-codex model route. It does NOT manage web search: the search provider
|
|
14
|
+
# (searchProvider, e.g. deepseek-official / exa) is configured by the user in their
|
|
15
|
+
# own profile layer, and this plugin never reads, rewrites, or switches search settings.
|
package/docs/INSTALL.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# 安装 / 卸载 / 故障恢复
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 已安装 DeepSeek Harness —— **桌面端客户端**,或命令行启动的 CLI profile(`dsh web`)
|
|
6
|
+
- 已安装 [pnpm](https://pnpm.io/)(`dsh plugin` 与插件页的安装框都依赖它)
|
|
7
|
+
- 拥有 ChatGPT Plus / Pro 订阅(或包含 Codex 额度的套餐)
|
|
8
|
+
|
|
9
|
+
## 安装
|
|
10
|
+
|
|
11
|
+
### 方式一:在 DSH 插件页添加(推荐;桌面端唯一方式)
|
|
12
|
+
|
|
13
|
+
打开 DSH 的 **插件 → 添加插件**,在「包名或地址」里填包名(推荐):
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
dsh-chatgpt-sub
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
npm 上的 `dsh-chatgpt-sub` 自 2026-10-13(0.5.1)起公开可装。也可以填仓库地址,安装的是仓库根(`lib/` 已入库,所以填地址安装**不跑构建、不会弹「待批准的构建脚本」**)。同一个框也接受:
|
|
20
|
+
|
|
21
|
+
- 本仓库工作副本的绝对路径 —— 用于开发(会产生 `link:` 安装)。
|
|
22
|
+
|
|
23
|
+
**桌面端客户端只能用这条**:DSH 的 `desktop` profile 由客户端自己管理,命令行 `dsh plugin --profile desktop ...` 会被直接拒绝(`profile "desktop" is managed exclusively by the Electron application`)。
|
|
24
|
+
|
|
25
|
+
### 方式二:命令行 `dsh plugin`
|
|
26
|
+
|
|
27
|
+
用你实际启动的 profile(`dsh web` 启动的是 `web`):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# 按包名(推荐;0.5.1 起已在 npm 公开)
|
|
31
|
+
dsh plugin --profile web add dsh-chatgpt-sub
|
|
32
|
+
|
|
33
|
+
# 或仓库默认分支(不跑构建,lib/ 已入库)
|
|
34
|
+
dsh plugin --profile web add https://github.com/SONGOAO25/dsh-chatgpt-sub
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`desktop` 被保留给桌面端客户端——CLI 会直接拒绝这个 profile,不会替你安装。
|
|
38
|
+
|
|
39
|
+
### 方式三:一键脚本(产生 `link:` 安装)
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
git clone https://github.com/SONGOAO25/dsh-chatgpt-sub.git
|
|
43
|
+
cd dsh-chatgpt-sub
|
|
44
|
+
./install.sh
|
|
45
|
+
# 默认安装到 web profile;其他 profile:
|
|
46
|
+
./install.sh --profile <profile名>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
脚本会先重建一次 `lib/`(`lib/` 已入库,这一步只是保证跑起来的代码与 `src/` 一致),再执行 `dsh plugin --profile <name> add <仓库根>`。`link:` 安装跟随你的工作副本而不是 npm。
|
|
50
|
+
|
|
51
|
+
### 安装原理
|
|
52
|
+
|
|
53
|
+
`dsh plugin add`(以及插件页的安装框)会:
|
|
54
|
+
|
|
55
|
+
1. 用 pnpm 把插件包安装到 profile 目录(`~/.dsh/profiles/<name>/`);
|
|
56
|
+
2. 检测到包声明了 `dsh.bundle`(仓库根的 `cordis.patch.yml`),自动把包名加入 profile 的 bundle 层列表(`dsh.profile.bundles`);
|
|
57
|
+
3. 下次启动 `dsh` 时,插件随 profile 自动加载——host 注册 OAuth 流程与 RPC、client 在插件详情页提供「ChatGPT 订阅」配置。
|
|
58
|
+
|
|
59
|
+
**注意:安装后需要重启 DSH 才会生效**——宿主进程在启动时组合插件。刷新页面不足以加载 host 端。
|
|
60
|
+
|
|
61
|
+
**为什么 git 地址安装不需要构建**:`lib/` 是入库的构建产物,仓库根就是一个开箱即用的插件包。
|
|
62
|
+
|
|
63
|
+
pnpm 对 git 依赖会执行包里的 `prepare` 脚本,且默认拦下要求批准(`ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED`)。本包不声明 `prepare` / `prepack`(`package.json` 里只有 `prepublishOnly`,仅在本仓库自己执行发布时才跑),所以填 GitHub 地址是**零构建、零授权**的。
|
|
64
|
+
|
|
65
|
+
### 验证安装成功
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
dsh --profile web --dump-config | grep dsh-chatgpt-sub
|
|
69
|
+
# 应看到 dsh-chatgpt-sub 行(bundle 层已生效)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
重启后,在 DSH **插件** 页能看到 **ChatGPT 订阅** 即安装成功。(桌面端客户端没有可用的 `dsh --profile` 命令,直接在插件页确认即可。)
|
|
73
|
+
|
|
74
|
+
## 绑定 ChatGPT 订阅
|
|
75
|
+
|
|
76
|
+
1. 打开 DSH **插件** 页 → 进入 **ChatGPT 订阅**。
|
|
77
|
+
2. 点「**绑定 ChatGPT 账号**」→ 浏览器打开 OpenAI 官方授权页。
|
|
78
|
+
3. 用 ChatGPT 账号登录并同意;插件页显示「已连接」即完成。
|
|
79
|
+
4. 新建对话,在模型切换器选择提供商 **ChatGPT** 的模型(如 `gpt-5.6-terra`)对话。
|
|
80
|
+
|
|
81
|
+
> 若浏览器未自动打开,请允许 DSH 弹窗(页面会以 `window.open` 兜底)。
|
|
82
|
+
> 绑定后模型切换器出现 ChatGPT 提供商;对话消耗订阅额度。
|
|
83
|
+
|
|
84
|
+
## 更新
|
|
85
|
+
|
|
86
|
+
在插件页的**版本与更新**里选择自动更新(默认)或手动更新。自动更新在 DSH 启动时检查 npm、校验并替换插件文件,重启后生效;手动检查只查询版本,安装前会弹出确认。更新失败自动恢复旧文件,需要时可以回滚;登录和绑定信息保留。设置页会显示运行版本、最新版本、上次检查时间以及是否需要重启。
|
|
87
|
+
|
|
88
|
+
更新状态、日志和备份保存在本端 `DSH_HOME` 下的 `dsh-chatgpt-sub/`(默认 `~/.dsh/dsh-chatgpt-sub/`;`DSH_CHATGPT_DATA_DIR` 可覆盖)。共享 Codex 登录文件及已有绑定标记位置保持原样。源码和链接安装不自动替换文件,仍按下面的方法更新;自动/手动更新都依赖 npm 上的公开版本(`dsh-chatgpt-sub` 自 0.5.1 起已公开)。
|
|
89
|
+
|
|
90
|
+
### 手动更新本地副本或迁移安装
|
|
91
|
+
|
|
92
|
+
| 你的安装方式 | 更新命令 |
|
|
93
|
+
|---|---|
|
|
94
|
+
| 包名 `dsh-chatgpt-sub`(插件页或命令行) | 使用插件页的「版本与更新」,更新后重启 DSH |
|
|
95
|
+
| 仓库地址(插件页或命令行) | 使用插件页的「版本与更新」;旧版本无更新入口时,在插件页移除后重新添加仓库地址,然后重启 DSH |
|
|
96
|
+
| `link:`(一键脚本或本地代码) | 见下方三步 |
|
|
97
|
+
|
|
98
|
+
`link:` 安装更新时要**三步一起做**:拉代码 → 切到默认分支 → 重新构建:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
cd dsh-chatgpt-sub
|
|
102
|
+
git fetch origin && git checkout main && git merge --ff-only origin/main
|
|
103
|
+
node scripts/build.mjs
|
|
104
|
+
# 重启 DSH
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
- **别只用 `git pull`**:本地开发分支从没推到远端时它会直接失败(`no such ref was fetched`);而且 `link:` 安装加载的是构建产物 `lib/`,只拉代码不重建,重启后跑的还是旧代码。
|
|
108
|
+
- 三条命令都是 `--ff-only` / 非破坏性的:工作区不干净或分支上有本地提交时,git 会拒绝执行,而不是覆盖你的改动。
|
|
109
|
+
- **本地副本不自动替换文件**:源码和 `link:` 安装需要手动拉取并构建。普通安装按插件页选择的自动或手动更新方式执行。
|
|
110
|
+
|
|
111
|
+
## 卸载
|
|
112
|
+
|
|
113
|
+
桌面端客户端:在 **插件** 页里卸载。命令行:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
cd dsh-chatgpt-sub
|
|
117
|
+
./uninstall.sh
|
|
118
|
+
# 或手动:
|
|
119
|
+
dsh plugin --profile web remove dsh-chatgpt-sub
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
卸载会清理:profile 插件条目、`llm-pi-ai.providers.openai-codex` 路由配置、`OPENAI_CODEX_API_KEY` 凭据、绑定标记目录。**保留** `~/.codex/auth.json`(codex CLI 自己的登录态)。重启后模型切换器的 ChatGPT 提供商自动消失。
|
|
123
|
+
|
|
124
|
+
## 与联网搜索的关系
|
|
125
|
+
|
|
126
|
+
插件**不管理联网搜索**:不会把 ChatGPT 订阅令牌当作搜索服务凭据,也不会读取、删除、记录或改写任何搜索配置(如 `DEEPSEEK_API_KEY`、`EXA_API_KEY`)。
|
|
127
|
+
|
|
128
|
+
搜索商(`searchProvider`,如 `deepseek-official` / `exa`)完全由用户在 DSH 的 profile 配置层自行指定;本插件无论绑定与否、处于哪个模型模式,都不触碰搜索设置。若未配置任何可用搜索商,`web_search` 会按 DSH 自身的规则明确失败,这与本插件无关。
|
|
129
|
+
|
|
130
|
+
## 故障排查
|
|
131
|
+
|
|
132
|
+
| 现象 | 原因与处理 |
|
|
133
|
+
|---|---|
|
|
134
|
+
| 插件详情里没有配置页 | ① 没重启:需重启 DSH;② 装错 profile:确认启动用的 profile 与安装目标一致;③ `dsh --profile web --dump-config` 里没有 dsh-chatgpt-sub:重新执行安装 |
|
|
135
|
+
| 插件页或命令行报「未找到相关插件」 | 先检查包名拼写;包名解析不到时改用仓库地址安装 |
|
|
136
|
+
| 插件页报「这个包没有声明组合包」 | 装到的是一个「仓库根不是包」的仓库。本仓库根目录一直是包;请确认填的是本仓库,并用包含最新提交的地址 |
|
|
137
|
+
| 插件页提示「有依赖的安装脚本需要你允许」/「待批准的构建脚本」 | 装到的清单里声明了 `prepare` / `prepack`(本仓库当前清单没有,只有 `prepublishOnly`)。用最新提交的仓库地址重装;确实需要放行时,按提示把 pnpm 打印的那一行加进 profile 的 `pnpm-workspace.yaml` 的 `allowBuilds` 再重试 |
|
|
138
|
+
| 命令行报 `profile "desktop" is managed exclusively by the Electron application` | 桌面端客户端的 profile 不能用 CLI 改:请在客户端 **插件 → 添加插件** 里安装/卸载 |
|
|
139
|
+
| 点绑定没反应/浏览器没打开 | ① 检查是否允许 DSH 弹窗;② 重启 DSH 后再试 |
|
|
140
|
+
| 提示「回调端口被占用」 | 端口 1455 被其他程序占用(如正在运行的 codex 登录流程),关闭占用程序后重试 |
|
|
141
|
+
| 授权超时(5 分钟) | 重新点「绑定 ChatGPT 账号」再试;确认浏览器完成了授权 |
|
|
142
|
+
| 绑定后模型切换器无 ChatGPT | 确认绑定成功(插件页显示「已连接」);重启 DSH 让路由注册生效 |
|
|
143
|
+
| 对话报错/模型不可用 | 可用模型以套餐为准(如 `gpt-5.3-codex-spark` 需更高计划);检查订阅额度 |
|
|
144
|
+
| 安装报 `pnpm not found` / 「没有找到 pnpm」 | 安装 pnpm:`npm i -g pnpm` 或 `corepack enable` |
|
|
145
|
+
| 想彻底移除插件影响 | 卸载 + 重启 DSH |
|
|
146
|
+
|
|
147
|
+
## 与其他插件的关系
|
|
148
|
+
|
|
149
|
+
- **[Bottom Info Bar](https://github.com/SONGOAO25/dsh-bottom-info-bar)**:信息栏插件只读本插件维护的登录信息,在底部信息栏显示可读取的 ChatGPT 额度窗口与重置时间。两者可独立安装;信息栏的 ChatGPT 额度显示需要本插件先绑定。
|