Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 <name>`. 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 `<InstallLocation>\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.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "codex_switch",
"private": true,
"version": "1.6.0",
"version": "1.6.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
39 changes: 39 additions & 0 deletions release-notes/v1.6.1.md
Original file line number Diff line number Diff line change
@@ -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 `<InstallLocation>\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 <name>`
- 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 `<InstallLocation>\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
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Loading