Open History to see the last commit
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";
11}