( logId: string | undefined, workspaceId: string | undefined, options?: UseLogDetailOptions )
| 185 | } |
| 186 | |
| 187 | export function useLogDetail( |
| 188 | logId: string | undefined, |
| 189 | workspaceId: string | undefined, |
| 190 | options?: UseLogDetailOptions |
| 191 | ) { |
| 192 | return useQuery({ |
| 193 | queryKey: logKeys.detail(workspaceId, logId), |
| 194 | queryFn: ({ signal }) => fetchLogDetail(logId as string, workspaceId as string, signal), |
| 195 | enabled: Boolean(logId) && Boolean(workspaceId) && (options?.enabled ?? true), |
| 196 | refetchInterval: options?.refetchInterval ?? false, |
| 197 | staleTime: 30 * 1000, |
| 198 | retry: (failureCount, err) => |
| 199 | !(isApiClientError(err) && err.status === 404) && failureCount < 3, |
| 200 | }) |
| 201 | } |
| 202 | |
| 203 | export function useLogByExecutionId( |
| 204 | workspaceId: string | undefined, |
no test coverage detected