(runId: string | undefined)
| 160 | import type { RunDetail } from '@/generated/run_detail' |
| 161 | |
| 162 | export function useRunState(runId: string | undefined) { |
| 163 | return useQuery<RunDetail>({ |
| 164 | queryKey: traceKeys.run(runId ?? ''), |
| 165 | queryFn: () => apiClient.get(`/api/runs/${runId}`), |
| 166 | enabled: !!runId, |
| 167 | staleTime: 5_000, |
| 168 | }) |
| 169 | } |
| 170 | |
| 171 | /** Fetch the run state as of a specific commit SHA. */ |
| 172 | export function useRunStateAt(runId: string | undefined, sha: string | undefined) { |
no outgoing calls
no test coverage detected
searching dependent graphs…