From 893fd11b98c165552e1b1a61480e8e5e4fd29a27 Mon Sep 17 00:00:00 2001 From: Qing Date: Sat, 10 Feb 2024 13:17:24 +0800 Subject: [PATCH] fix plugin model refetch --- web_app/src/components/Settings.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web_app/src/components/Settings.tsx b/web_app/src/components/Settings.tsx index 6d097e2..a301ada 100644 --- a/web_app/src/components/Settings.tsx +++ b/web_app/src/components/Settings.tsx @@ -94,7 +94,11 @@ export function SettingsDialog() { setModel(settings.model) }, [settings.model]) - const { data: serverConfig, status } = useQuery({ + const { + data: serverConfig, + status, + refetch, + } = useQuery({ queryKey: ["serverConfig"], queryFn: getServerConfig, }) @@ -250,6 +254,8 @@ export function SettingsDialog() { setModelSwitchingTexts([]) updateAppState({ disableShortCuts: false }) + + refetch() } }