Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

threadSession.ts

11 lines446 Bytes

1import type { OrchestrationSessionStatus } from "@t3tools/contracts";
2​
3export type ThreadSessionReloadAvailability = "available" | "disabled" | "hidden";
4​
5export function threadSessionReloadAvailability(
6 status: OrchestrationSessionStatus | null,
7): ThreadSessionReloadAvailability {
8 if (status === null || status === "stopped") return "hidden";
9 if (status === "starting" || status === "running") return "disabled";
10 return "available";