mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-06 20:02:49 +08:00
fix: 微信插件 OpenClaw < 2026.3.22 时直接拒绝安装并提示升级
微信插件所有版本(v1.0.0~v2.0.1)都依赖 OpenClaw 2026.3.22+ 的 channel-config-schema SDK, 没有兼容旧版的版本存在。不再尝试 fallback 安装,直接给出明确的升级提示。
This commit is contained in:
@@ -1198,10 +1198,23 @@ pub async fn run_channel_action(
|
|||||||
.collect();
|
.collect();
|
||||||
let needs_legacy = oc_nums < vec![2026, 3, 22];
|
let needs_legacy = oc_nums < vec![2026, 3, 22];
|
||||||
if needs_legacy {
|
if needs_legacy {
|
||||||
"@tencent-weixin/openclaw-weixin-cli@1.0.3".to_string()
|
// 微信插件所有版本(v1.0.0~v2.0.1)都依赖 OpenClaw 2026.3.22+ 的 SDK
|
||||||
} else {
|
// 没有兼容旧版的版本,必须先升级 OpenClaw
|
||||||
"@tencent-weixin/openclaw-weixin-cli@latest".to_string()
|
let _ = app.emit(
|
||||||
|
"channel-action-log",
|
||||||
|
json!({ "platform": &platform, "action": &action, "kind": "error",
|
||||||
|
"message": format!("微信插件要求 OpenClaw >= 2026.3.22,当前版本 {} 不兼容。请先在「服务管理」页面升级 OpenClaw。", oc_ver) }),
|
||||||
|
);
|
||||||
|
let _ = app.emit(
|
||||||
|
"channel-action-progress",
|
||||||
|
json!({ "platform": &platform, "action": &action, "progress": 100 }),
|
||||||
|
);
|
||||||
|
return Err(format!(
|
||||||
|
"微信插件要求 OpenClaw >= 2026.3.22,当前版本 {} 不兼容,请先升级 OpenClaw",
|
||||||
|
oc_ver
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
"@tencent-weixin/openclaw-weixin-cli@latest".to_string()
|
||||||
};
|
};
|
||||||
// 先清理旧的不兼容插件目录 + openclaw.json 中的残留配置
|
// 先清理旧的不兼容插件目录 + openclaw.json 中的残留配置
|
||||||
// (否则 OpenClaw 配置校验会报 unknown channel / plugin not found)
|
// (否则 OpenClaw 配置校验会报 unknown channel / plugin not found)
|
||||||
|
|||||||
Reference in New Issue
Block a user