Download web/src/components/shell/cockpit.tsx from EnergyVenom/patchwise-agent-studio: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/web/src/components/shell/cockpit.tsx
- Command line
-
hf download hf://spaces/EnergyVenom/patchwise-agent-studio/web/src/components/shell/cockpit.tsx
-
curl -L -o cockpit.tsx https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/web/src/components/shell/cockpit.tsx
1.27 kB
| import { usePatchWatch, usePodProfile, usePods } from '../../api/hooks'; | |
| import { shortWhen } from '../../domain/runName'; | |
| /** The release the readiness is about, as the page's one-line sub-title: "Patch 26C. Test environment release 26C, checked 18 Oct 23:53." | |
| * "Next Oracle update" is shown only when the API gives a date; it is never guessed. The environment cue lives in the top bar. */ | |
| export function ReleaseLine({ podId, patch, nextUpdate }: { podId: number | null; patch: string | null; nextUpdate?: string | null }) { | |
| const pods = usePods().data ?? []; | |
| const pod = pods.find((p) => p.id === podId); | |
| const profile = usePodProfile(); | |
| const watch = usePatchWatch(); | |
| const release = profile.data?.about?.release ?? pod?.release ?? null; | |
| const checked = watch.data?.last_checked_at ?? profile.data?.scanned_at ?? null; | |
| const parts = [ | |
| patch ? `Patch ${patch}.` : '', | |
| release ? `Test environment release ${release}${checked ? `, checked ${shortWhen(checked)}` : ''}.` : '', | |
| nextUpdate ? `Next Oracle update: ${shortWhen(nextUpdate).replace(/ \d\d:\d\d$/, '')}.` : '', | |
| ].filter(Boolean); | |
| if (!parts.length) return null; | |
| return <span className="fpt-release-line" data-testid="release-line">{parts.join(' ')}</span>; | |
| } | |