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(