Open History to see the last commit
1/**
2 * The machine triage runs on: the one on screen, else the first connected
3 * machine whose server supports triage. The palette row names the pick.
4 */
5export function pickTriageEnvironment<Id extends string>(input: {
6 readonly onScreen: Id | null;
7 readonly connected: ReadonlyArray<Id>;
8 readonly supportsTriage: (environmentId: Id) => boolean;
9}): Id | null {
10 return input.onScreen ?? input.connected.find(input.supportsTriage) ?? null;
11}