Skip to content

v2.14.2

Choose a tag to compare

@WhiteBr1ck WhiteBr1ck released this 23 Nov 17:33
· 109 commits to main since this release

中文说明

  • 修复多账号「添加账号」热登录后未重启导致约 50 分钟回退旧账号并污染凭据槽的问题(#22、#23,感谢 @Hi-Jiajun 的根因排查与 PR):
    • 跨平台凭据归属校验:在 Linux、macOS、Windows 和 WSL2 凭据库中支持解析 StoredToken JSON 的 id_token_email(兼容非 JSON 历史凭据),在读写备份槽、同步活跃账号、切号与刷新凭据前核对归属邮箱,拦截跨号覆写与额度串号污染。
    • 添加账号完成后受控重启:新增 accounts.completeAdd,确保新账号凭据同步落盘,在检测到账号变更或令牌轮换时写入 pendingSwitch 防覆盖锁并触发重启以清除旧进程里的 TokenSource(取消登录不触发重启,重启不可用时优雅降级为手动重启提示,同步消除自动切号与慢状态更新的竞态)。
    • 补充 zh-TW 繁体字形映射(彻 -> 徹)。

English Notes

  • Fixed multi-account in-place "Add account" reverting to the previous account after ~50 minutes and clobbering backup credentials (#22, #23, thanks @Hi-Jiajun for the root-cause analysis and PR):
    • Cross-platform credential ownership verification: Extracts id_token_email from StoredToken JSON across Linux, macOS, Windows, and WSL2 credential vaults (with graceful fallback for opaque non-JSON tokens) and verifies expectedEmail before saving, restoring, switching, or recording quotas.
    • Controlled relaunch after in-place sign-in: Added accounts.completeAdd to persist the new account backup, set the pendingSwitch lock, and trigger a clean relaunch when the account changes or tokens rotate so stale language_server TokenSource instances cannot overwrite the keyring (skips relaunch on cancelled sign-ins, degrades cleanly to manualRestartRequired, and guards against auto-switch and slow-Redux races).
    • Added missing zh-TW glyph mapping for the new UI copy.