fix: 汉化版检测兜底——版本号含 -zh 时强制判定为汉化版

Rust get_version_info + Web dev-api.js get_version_info:
如果检测到的版本号包含 "-zh" 后缀,直接覆盖 source 为 "chinese",
不再依赖文件系统路径检测(Windows .cmd shim 路径不含包名信息)
This commit is contained in:
晴天
2026-03-26 06:36:20 +08:00
parent 535f72d1f9
commit ac903f84b4
2 changed files with 10 additions and 2 deletions

View File

@@ -2983,8 +2983,10 @@ const handlers = {
// 版本信息
async get_version_info() {
const source = detectInstalledSource()
let source = detectInstalledSource()
const current = getLocalOpenclawVersion()
// 兜底:版本号含 -zh 则一定是汉化版
if (current && current.includes('-zh') && source !== 'chinese') source = 'chinese'
const latest = await getLatestVersionFor(source)
const recommended = recommendedVersionFor(source)