(workingDir: string | undefined, hash: string | null)
| 78 | }, |
| 79 | }), |
| 80 | enabled: !!workingDir && !!filePath, |
| 81 | refetchInterval: refreshInterval, |
| 82 | refetchIntervalInBackground: false, |
| 83 | refetchOnWindowFocus: refreshInterval ? 'always' : false, |
| 84 | refetchOnReconnect: refreshInterval ? 'always' : false, |
| 85 | }) |
| 86 | } |
| 87 | |
| 88 | export function useGitLog(workingDir: string | undefined) { |
| 89 | const visibleContext = useGitVisibilityStore((state) => state.visibleContext) |
| 90 | const refreshInterval = getGitHistoryRefreshInterval(workingDir, visibleContext) |
| 91 | |
| 92 | return useQuery({ |
no test coverage detected