(runId: string | undefined)
| 30 | |
| 31 | /** Every commit that touched `runs/<id>/`, newest first. */ |
| 32 | export function useRunCommits(runId: string | undefined) { |
| 33 | return useQuery<CommitInfo[]>({ |
| 34 | queryKey: traceKeys.commits(runId ?? ''), |
| 35 | queryFn: () => apiClient.get(`/api/runs/${runId}/commits`), |
| 36 | enabled: !!runId, |
| 37 | // Commits are append-only; the list only grows. SSE `run_updated` events |
| 38 | // invalidate this cache, so 60s is a safe upper bound for window/focus refetches. |
| 39 | staleTime: 60_000, |
| 40 | }) |
| 41 | } |
| 42 | |
| 43 | export interface StepFile { |
| 44 | name: string |
no outgoing calls
no test coverage detected
searching dependent graphs…