From bb6f0edadd953a87448128c130d29d83919ea76d Mon Sep 17 00:00:00 2001 From: Cmochance <3216202644@qq.com> Date: Sun, 12 Jul 2026 07:44:52 +0800 Subject: [PATCH] chore(release): prepare v1.6.1 - bump version 1.6.0 -> 1.6.1 (package.json / Cargo.toml / locks) - CHANGELOG: promote Unreleased to 1.6.1 - 2026-07-12 - README (zh/en): refresh version:set example - release-notes/v1.6.1.md: bilingual notes (Windows ChatGPT merge adaptation, #54) --- CHANGELOG.md | 2 +- README.md | 2 +- README.zh-CN.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- release-notes/v1.6.1.md | 39 +++++++++++++++++++++++++++++++++++++++ src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- 8 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 release-notes/v1.6.1.md diff --git a/CHANGELOG.md b/CHANGELOG.md index a237ba3..d180752 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 1.6.1 - 2026-07-12 - **Critical** — adapted the Windows desktop-host discovery for the Codex → ChatGPT app merge (2026-07-09; the Windows counterpart of the macOS adaptation shipped in 1.6.0). The merged host runs as `ChatGPT.exe` (MSIX package family still `OpenAI.Codex_2p2nqsd0c76g0`, non-Store installs under `%LOCALAPPDATA%\Programs\ChatGPT\`), so the old `Codex.exe`-only checks missed the running UI: switching skipped quitting the host (stale in-memory app-server on the old account) and never relaunched it. is-running / quit now enumerate both host names and classify each PID by its executable's install identity — the `OpenAI.Codex*` package family (incl. the beta channel) or a non-Store install that embeds the bundled CLI (`resources\codex.exe`, the Windows analog of the macOS `Contents/Resources/codex` qualifier) counts as ours; ChatGPT Classic (`OpenAI.ChatGPT-Desktop_…`, same `ChatGPT.exe` name) is positively excluded and never killed; unattributable PIDs still count as running (the switch aborts rather than proceeding over a possibly-live host) but are never signalled. Quit signals by PID (graceful `taskkill /PID` then `/F`) instead of `/IM `. Launch prefers the detected Store package (unchanged `shell:AppsFolder` id), falling back to a qualified non-Store `ChatGPT.exe` / `Codex.exe`. CLI discovery and the Settings auto-detect suggestions gain the desktop-bundled CLI locations (MSIX `\app\resources\codex.exe` and the non-Store `Programs\{ChatGPT,Codex}\resources\codex.exe`). Facts anchored from public manifests and tooling (winget, KAPE, third-party Codex tools); not yet verified on a live Windows install. diff --git a/README.md b/README.md index 385c826..2185444 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ Windows 构建走 CI 的 `tauri build --target x86_64-pc-windows-msvc`;本地 ```bash npm run version:sync # 把 package.json 当前 version 同步到 Cargo / lock -npm run version:set -- 1.6.0 # 一次性 bump 到指定版本 +npm run version:set -- 1.6.1 # 一次性 bump 到指定版本 npm run version:check # CI 用:拒绝把 semver 字面量写回 *.html ``` diff --git a/README.zh-CN.md b/README.zh-CN.md index 385c826..2185444 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -135,7 +135,7 @@ Windows 构建走 CI 的 `tauri build --target x86_64-pc-windows-msvc`;本地 ```bash npm run version:sync # 把 package.json 当前 version 同步到 Cargo / lock -npm run version:set -- 1.6.0 # 一次性 bump 到指定版本 +npm run version:set -- 1.6.1 # 一次性 bump 到指定版本 npm run version:check # CI 用:拒绝把 semver 字面量写回 *.html ``` diff --git a/package-lock.json b/package-lock.json index 2260983..9102091 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "codex_switch", - "version": "1.6.0", + "version": "1.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "codex_switch", - "version": "1.6.0", + "version": "1.6.1", "dependencies": { "@tauri-apps/api": "2.10.1" }, diff --git a/package.json b/package.json index a4b56df..41d028a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "codex_switch", "private": true, - "version": "1.6.0", + "version": "1.6.1", "type": "module", "scripts": { "dev": "vite", diff --git a/release-notes/v1.6.1.md b/release-notes/v1.6.1.md new file mode 100644 index 0000000..37d8659 --- /dev/null +++ b/release-notes/v1.6.1.md @@ -0,0 +1,39 @@ +# Codex Switch v1.6.1 + +## 中文 + +### Windows 端适配 Codex 并入 ChatGPT 桌面 app + +1.6.0 修复了 macOS 侧的合并适配,本版补 Windows 端(合并同批于 2026-07-09)。合并后宿主以 `ChatGPT.exe` 运行,MSIX 包家族仍是 `OpenAI.Codex_2p2nqsd0c76g0`,旧的只认 `Codex.exe` 的检测看不到运行界面:切换不退宿主(内存 app-server 仍持旧账号),也不重新拉起。 + +本版本改动: + +- is-running 与 quit 用一次 `Win32_Process` CIM 查询枚举宿主进程名,按每个 PID 的可执行安装身份分类:`OpenAI.Codex*` 包家族(含 beta)或内嵌 `resources\codex.exe` 的非 Store 安装计为本体 +- ChatGPT Classic(`OpenAI.ChatGPT-Desktop_…`,可执行名同为 `ChatGPT.exe`)被正向排除,绝不误杀;无法确认身份的宿主计入运行但绝不发信号,切换转为中止而非冒串号风险 +- quit 改按 PID 发信号(先 `taskkill /PID` 优雅、后 `/F` 强制),不再按 `/IM 进程名` 全杀 +- 启动优先探测到的 Store 包(`shell:AppsFolder` id 不变),否则回退到合格的非 Store `ChatGPT.exe` / `Codex.exe` +- CLI 发现与设置页自动检测新增桌面宿主内嵌 CLI 位置(MSIX `\app\resources\codex.exe` 与非 Store `Programs\{ChatGPT,Codex}\resources\codex.exe`) + +### 验证 + +- `cargo test --lib`(137 通过,含新增 Windows 分类/beta/内嵌 CLI 用例) +- `cargo fmt --all -- --check` / `cargo machete`;关键事实取自公开来源(winget / KAPE),尚未在 Windows 实机验证 + +## English + +### Windows adaptation for Codex folding into the ChatGPT desktop app + +1.6.0 fixed the macOS side; this release adds Windows (merged for both on 2026-07-09). The merged host runs as `ChatGPT.exe` while the MSIX package family stays `OpenAI.Codex_2p2nqsd0c76g0`, so the old `Codex.exe`-only checks missed the running UI: switching skipped quitting the host (leaving its in-memory app-server on the old account) and never relaunched it. + +Changes in this release: + +- is-running and quit enumerate host process names via one `Win32_Process` CIM query and classify each PID by its executable install identity: the `OpenAI.Codex*` package family (incl. beta) or a non-Store install embedding `resources\codex.exe` counts as ours +- ChatGPT Classic (`OpenAI.ChatGPT-Desktop_…`, whose executable is also `ChatGPT.exe`) is positively excluded and never killed; an unidentifiable host counts as running but is never signalled, so the switch aborts rather than risk cross-contamination +- quit signals by PID (graceful `taskkill /PID`, then `/F`) instead of `/IM ` +- launch prefers the detected Store package (unchanged `shell:AppsFolder` id), falling back to a qualified non-Store `ChatGPT.exe` / `Codex.exe` +- CLI discovery and the Settings auto-detect gain the desktop-bundled CLI locations (MSIX `\app\resources\codex.exe` and non-Store `Programs\{ChatGPT,Codex}\resources\codex.exe`) + +### Verification + +- `cargo test --lib` (137 passed, incl. new Windows classification / beta / bundled-CLI cases) +- `cargo fmt --all -- --check` / `cargo machete`; facts sourced from public manifests (winget / KAPE), not yet verified on a live Windows install diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 3514215..4c40200 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -466,7 +466,7 @@ dependencies = [ [[package]] name = "codex_switch" -version = "1.6.0" +version = "1.6.1" dependencies = [ "base64 0.22.1", "chrono", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 7fa6320..84b8476 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "codex_switch" -version = "1.6.0" +version = "1.6.1" description = "Native Tauri control panel for Codex account switching" authors = ["Cmochance"] edition = "2021"