/**
 * Session-level backup for the per-project Docker TeX Live Full preference.
 *
 * The durable source of truth is LearnitiveProjectConfig.cloudFallbackSticky. This
 * small in-memory set makes the routing fail-safe: once a browser compiler has
 * proven insufficient, Compile and Live PDF immediately agree on cloud routing
 * even if persisting project metadata is delayed or temporarily unavailable.
 */
const stickyProjects = new Set<string>();

export function hasSessionCloudFallback(wsName: string): boolean {
  return stickyProjects.has(wsName);
}

export function rememberSessionCloudFallback(wsName: string): void {
  stickyProjects.add(wsName);
}

export function clearSessionCloudFallback(wsName: string): void {
  stickyProjects.delete(wsName);
}
