From f05ed3dbac5ceec3db97f5e22d0d18390a2bac43 Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 4 Jul 2026 22:54:15 +0800 Subject: [PATCH] fix(ui): invalidate proxy takeover status after profile switch --- src/App.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index df888dc32..d79b62e49 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -382,11 +382,14 @@ function App() { } }); - // 托盘应用项目后刷新相关缓存(providers 由既有 provider-switched 监听承接) + // 应用项目后刷新相关缓存(providers 由既有 provider-switched 监听承接; + // proxy 状态由后端直接改 DB,不走 mutation,必须显式刷新) useTauriEvent("profile-applied", async () => { await queryClient.invalidateQueries({ queryKey: ["profiles"] }); await queryClient.invalidateQueries({ queryKey: ["mcp", "all"] }); await queryClient.invalidateQueries({ queryKey: ["skills"] }); + await queryClient.invalidateQueries({ queryKey: ["proxyTakeoverStatus"] }); + await queryClient.invalidateQueries({ queryKey: ["proxyStatus"] }); }); useTauriEvent(