(runId: string | undefined, sha: string | undefined)
| 170 | |
| 171 | /** Fetch the run state as of a specific commit SHA. */ |
| 172 | export function useRunStateAt(runId: string | undefined, sha: string | undefined) { |
| 173 | return useQuery<RunDetail>({ |
| 174 | queryKey: traceKeys.runAt(runId ?? '', sha ?? ''), |
| 175 | queryFn: () => apiClient.get(`/api/runs/${runId}?at=${encodeURIComponent(sha!)}`), |
| 176 | enabled: !!runId && !!sha, |
| 177 | // (runId, sha) addresses an immutable git blob; never goes stale. |
| 178 | staleTime: Infinity, |
| 179 | }) |
| 180 | } |
| 181 | |
| 182 | /** One reply entry on a run's append-only stream. */ |
| 183 | export interface RunReply { |
no outgoing calls
no test coverage detected
searching dependent graphs…