From e36f5b61d6dc460d1dbfcb5808dcb4424c21939a Mon Sep 17 00:00:00 2001 From: allen2fuc Date: Fri, 31 Jul 2026 09:54:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8/=E5=9B=9E=E6=BB=9A=20PEQ=20?= =?UTF-8?q?=E5=90=8E=E5=88=B7=E6=96=B0=E6=8E=A5=E5=8F=A3=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E4=B8=8D=E5=BA=94=E5=BD=B1=E5=93=8D=E4=B8=BB=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 executeApplyToggle 中 upgradePeqChange 已成功但后续 refreshState (msgAdd) 因固件不支持或网络抖动而失败时,错误地将整个操作判定为失败、 弹出 "Operation failed" 且不更新本地已应用状态的问题。 Co-Authored-By: Claude Sonnet 5 --- client/src/pages/AIPage.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/pages/AIPage.tsx b/client/src/pages/AIPage.tsx index c353e01..91b2f98 100644 --- a/client/src/pages/AIPage.tsx +++ b/client/src/pages/AIPage.tsx @@ -690,7 +690,11 @@ export default function AIPage({ variant = "page", onClose }: AIPageProps = {}) }, }); await updateMessageApplied(msg.id, nextApplied); - await api.refreshState(); + try { + await api.refreshState(); + } catch { + // 部分固件不支持该刷新接口,不影响本次应用/回滚已经成功的结果 + } setMessages((prev) => prev.map((m) => m.kind === "optimize" && m.id === msg.id