feat(model-connections): refetch setup status on window focus

This commit is contained in:
Anish Sarkar 2026-07-14 00:15:10 +05:30
parent 4b4efc243a
commit ad91a3bfa5

View file

@ -54,6 +54,9 @@ export const llmSetupStatusAtomFamily = atomFamily((workspaceId: number) =>
queryKey: cacheKeys.modelConnections.setupStatus(workspaceId),
enabled: workspaceId > 0 && isAuthenticated(),
staleTime: 5 * 60 * 1000,
// Recovery is event-driven: mutations invalidate this key; external fixes
// are caught on window focus. No polling, so not-ready tabs cost nothing.
refetchOnWindowFocus: true,
queryFn: () => modelConnectionsApiService.getLlmSetupStatus(workspaceId),
}))
);