From abec074a66bd2fd624f45279b9a665a6a8944e8c Mon Sep 17 00:00:00 2001 From: llamantino <213239228+llamantino@users.noreply.github.com> Date: Sat, 7 Jun 2025 22:52:59 +0200 Subject: [PATCH] fix: prevent LLM settings reset when page loses focus during initial setup (#8928) Co-authored-by: llamantino <12345678+yourusername@users.noreply.github.com> --- frontend/src/hooks/query/use-settings.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/hooks/query/use-settings.ts b/frontend/src/hooks/query/use-settings.ts index 7cff880696..e47877b077 100644 --- a/frontend/src/hooks/query/use-settings.ts +++ b/frontend/src/hooks/query/use-settings.ts @@ -45,6 +45,7 @@ export const useSettings = () => { // would want to show the modal immediately if the // settings are not found retry: (_, error) => error.status !== 404, + refetchOnWindowFocus: false, staleTime: 1000 * 60 * 5, // 5 minutes gcTime: 1000 * 60 * 15, // 15 minutes enabled: !isOnTosPage && !!userIsAuthenticated,