fix plugin model refetch

This commit is contained in:
Qing 2024-02-10 13:17:24 +08:00
parent 487232c19e
commit 893fd11b98

View File

@ -94,7 +94,11 @@ export function SettingsDialog() {
setModel(settings.model) setModel(settings.model)
}, [settings.model]) }, [settings.model])
const { data: serverConfig, status } = useQuery({ const {
data: serverConfig,
status,
refetch,
} = useQuery({
queryKey: ["serverConfig"], queryKey: ["serverConfig"],
queryFn: getServerConfig, queryFn: getServerConfig,
}) })
@ -250,6 +254,8 @@ export function SettingsDialog() {
setModelSwitchingTexts([]) setModelSwitchingTexts([])
updateAppState({ disableShortCuts: false }) updateAppState({ disableShortCuts: false })
refetch()
} }
} }