应用/回滚 PEQ 后刷新接口失败不应影响主流程结果提示
修复 executeApplyToggle 中 upgradePeqChange 已成功但后续 refreshState (msgAdd) 因固件不支持或网络抖动而失败时,错误地将整个操作判定为失败、 弹出 "Operation failed" 且不更新本地已应用状态的问题。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -690,7 +690,11 @@ export default function AIPage({ variant = "page", onClose }: AIPageProps = {})
|
||||
},
|
||||
});
|
||||
await updateMessageApplied(msg.id, nextApplied);
|
||||
try {
|
||||
await api.refreshState();
|
||||
} catch {
|
||||
// 部分固件不支持该刷新接口,不影响本次应用/回滚已经成功的结果
|
||||
}
|
||||
setMessages((prev) =>
|
||||
prev.map((m) =>
|
||||
m.kind === "optimize" && m.id === msg.id
|
||||
|
||||
Reference in New Issue
Block a user