- [Seamless In-App & Homebrew Dual-Track Auto Update with Instant Channel Sync]:
- Instant Update Channel Switching & Explicit Parameter Forwarding:
check_for_updatesTauri command and Axum admin endpoints now support an explicitchannelparameter. Toggling between Stable and Beta in Settings immediately persists preferences and triggers an on-the-fly update check with the chosen channel, eliminating race conditions and stale channel fallbacks. - Homebrew & Native Online Update Dual-Track Freedom: For users with Homebrew Cask installations, added a direct "Switch to In-App Online Update" toggle next to the brew upgrade button. Users can freely choose between managing updates via
brewor applying instant in-app hot-patching; selecting the Beta channel automatically falls back to native in-app updates. - Surfaced Update Channel Control in General Settings: Exposed the Update Channel selector directly under "General Settings -> Auto Check for Updates", enabling instant one-click switching without having to navigate to the "About" tab.
- Instant Update Channel Switching & Explicit Parameter Forwarding:
- [Egress Unsupported Location Fake 403 Neutralization & One-Click Unlock Probe] (Ref #3995):
- Account-Level Protection Against Location-Unsupported 403s: Added
is_location_unsupported_errorguards across OpenAI, Claude, and Gemini handlers and the account model lock engine. When proxy egress IPs transiently drift or encounter region restrictions (Location not supported/UNSUPPORTED_LOCATION), the error is properly classified as a network/proxy issue rather than account infringement, strictly preventing accounts from being markedproxy_disabledor permanently locked. (Ref #3995) - One-Click 403 Lock Clearing & Re-Probing: Introduced the
clear_account_forbiddenTauri command and store actions to safely reset system 403 locks and temporary model restrictions. Added a "Clear 403 & Re-probe" action withinAccountErrorDialog, eliminating the need to manually edit local JSON config files. (Ref #3995) - Official Google Appeal Form Fallback for Link-less 403s: When upstream denies requests with
TOS_VIOLATIONor permission locks without supplying a dynamic verification URL, the error modal automatically falls back to providing the official Google Cloud Code service appeal form (https://forms.gle/hGzM9MEUv2azZsrb9) for clear user recovery guidance. (Ref #3995)
- Account-Level Protection Against Location-Unsupported 403s: Added
- [Avoid Windows RwLock Deadlock Restoring Main Window from Lightweight Mode] (Fixes #3993, PR #3996, Thanks to @koeria):
- Skip Main Window Initial Auto-Restore to Prevent Same-Thread Re-entrant Deadlock: Configured
.skip_initial_state("main")ontauri-plugin-window-stateto disable synchronous state restoration fromon_window_readyinsideWebviewWindow::build(). Eliminates the deadlock where Win32SetWindowPosdispatchesWM_WINDOWPOSCHANGEDback into tao, which attempts to re-acquire the non-reentrantWindowManager/PluginStorelock still held by Tauri. (Fixes #3993, PR #3996, Thanks to @koeria) - Decoupled Window State Restoration Post-Construction & Tray/Instance Hop: Moved initial window restoration to
.setup()post-construction, and deferred state restoration on lightweight-mode rebuilds via a dedicated worker thread hop to the main event loop (bypassingrun_on_main_threadinline execution when already on the UI thread), ensuring tray clicks and single-instance callbacks fully release all plugin locks prior to window geometry restoration. (Fixes #3993, PR #3996, Thanks to @koeria)
- Skip Main Window Initial Auto-Restore to Prevent Same-Thread Re-entrant Deadlock: Configured
- [Stealth System Prompt Sideloading Multi-Turn Idempotence & LF Normalization] (Fixes #3994):
- Full Parts Container Scanning Against Duplicate Injections: Enhanced the injection status check in
InboundThinkingPipeline::sideload_system_instruction_if_neededfrom strictly inspectingcontents[0].parts[0]to scanning all text parts withincontents[0].parts, preventing duplicate<system-instruction>wrapper injections when clients restructure multi-part messages across turns and keeping Google upstream prefix hashes intact. (Fixes #3994) - Deterministic LF Normalization for Sideloaded Directives: Enforced newline normalization (
replace("\r\n", "\n")) on trimmed system prompt directives prior to XML container wrapping, eliminating subtle byte-level prefix drifts across Windows CRLF and Unix LF environments and guaranteeing consistent 90%+ KV Cache reuse across multi-turn sessions under stealth sideloading mode. (Fixes #3994)
- Full Parts Container Scanning Against Duplicate Injections: Enhanced the injection status check in
- [在线更新与 Homebrew 双轨自由切换与通道即时联动]:
- 更新通道即时联动与后端参数透传:
check_for_updates指令与 Axum 管理接口全面支持显式透传channel参数,前端点击切换【正式版 / 预览版】后立即持久化并以新通道自动触发更新检查,彻底消除跨通道检查的时序延迟与旧值覆盖。 - Homebrew 与原生在线更新双轨自由切换: 针对 Homebrew Cask 安装的用户,在提供便捷
brew upgrade的同时,增加「改用应用内在线更新」直达入口,随时支持切换回原生自动下载更新;当选择预览版通道时,系统自动无缝使用原生在线热更。 - 设置页更新通道入口优化: 在“通用设置 -> 自动检查更新”区域同步透出【更新通道】切换卡片,无需跳转至“关于”页即可直观切换正式版与预览版。
- 更新通道即时联动与后端参数透传:
- [出口 IP 地区不支持假 403 误杀防御与一键解封测活] (Ref #3995):
- 地区不支持 403 账号级保护: 针对代理节点临时漂移或地区不支持(
Location not supported/UNSUPPORTED_LOCATION)被上游下发 403 的场景,在 OpenAI / Claude / Gemini 适配器与账号模型冻结层增加特征拦截守卫,将其准确识别为代理网络层问题,严禁无差别将账号标记为proxy_disabled或模型锁定,避免优质账号被永久误杀。(Ref #3995) - 一键清除 403 锁定与自动测活: 新增
clear_account_forbidden后端指令与状态复位引擎,解除系统 403 与临时冻结;在前端错误弹窗(AccountErrorDialog)为受限账号提供「清除 403 标记并重新测活」通道,告别手动修改本地配置文件的繁琐操作。(Ref #3995) - 缺失验证链接 403 兜底 Google 官方申诉表单: 针对上游仅返回
TOS_VIOLATION或账号封锁但未携带动态验证 URL 的情况,弹窗自动兜底提供 Google Cloud Code 官方服务申诉表单(https://forms.gle/hGzM9MEUv2azZsrb9),为用户建立清晰明确的解封自救指引。(Ref #3995)
- 地区不支持 403 账号级保护: 针对代理节点临时漂移或地区不支持(
- [Windows 轻量模式主窗口恢复 RwLock 死锁修复] (Fixes #3993, PR #3996, Thanks to @koeria):
- 跳过主窗口初始化自动恢复避免同线程重入死锁: 在
tauri-plugin-window-state初始化时配置.skip_initial_state("main"),禁止窗口在WebviewWindow::build内部由on_window_ready同步触发状态恢复。根除 Windows 平台下SetWindowPos派发WM_WINDOWPOSCHANGED同步重入 tao 事件循环并在尚未释放WindowManager/PluginStore锁时再次申请非重入读写锁导致的托盘和 UI 无响应死锁。(Fixes #3993, PR #3996, Thanks to @koeria) - 轻量模式窗口重建后异步解耦恢复状态: 启动窗口状态恢复显式收敛至
setup构造完成后执行;轻量模式下销毁再建时,通过独立工作线程跳板派发至主线程队列(规避run_on_main_thread在当前主线程内就地执行无法让渡托盘与单实例回调插件锁的问题),确保窗口状态恢复与单实例激活路径彻底解耦锁持有生命周期。(Fixes #3993, PR #3996, Thanks to @koeria)
- 跳过主窗口初始化自动恢复避免同线程重入死锁: 在
- [系统提示词隐身侧载跨轮次幂等加固与前缀换行规范化] (Fixes #3994):
- 隐身侧载全 Parts 容器扫描与防重复注入: 增强
InboundThinkingPipeline::sideload_system_instruction_if_needed中的已注入状态判定逻辑,由单一检查contents[0].parts[0]开头放宽为全面扫描contents[0].parts中所有文本块,避免多轮会话或客户端重组 parts 时重复插入<system-instruction>容器破坏 Google 上游前缀哈希。(Fixes #3994) - 侧载指令字节级确定性换行对齐: 在侧载封装前对系统指令执行确定性换行规范化(
replace("\r\n", "\n")),消除跨平台 Windows CRLF 与 Unix LF 混用导致的前缀微小字节偏移,确保在开启隐身侧载模式下连续多轮对话达成 90%+ 的极致 KV Cache 复用率。(Fixes #3994)
- 隐身侧载全 Parts 容器扫描与防重复注入: 增强
What's Changed
- fix(app): avoid Windows RwLock deadlock when restoring main window from lightweight mode (Fixes #3993) by @koeria in #3996
Full Changelog: v5.0.4-beta.15...v5.0.4-beta.16