(workingDir: string | undefined, hash: string | null, filePath: string | null)
| 89 | filePath: string | null, |
| 90 | type: 'uncommitted' | 'committed', |
| 91 | token: string | undefined, |
| 92 | options: { force?: boolean } = {}, |
| 93 | ) { |
| 94 | const force = options.force === true |
| 95 | return useQuery({ |
| 96 | queryKey: queryKeys.gitDiffs.file(workingDir || '', type, filePath || '', token ?? '', force), |
| 97 | queryFn: ({ signal }) => |
| 98 | apiClient.get<GitDiffResponse>('/git/diff', { |
| 99 | params: { |
| 100 | workingDir: workingDir || '', |
| 101 | path: filePath || '', |
| 102 | type, |
| 103 | ...(force ? { force: '1' } : {}), |
no test coverage detected