Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

439 B
Raw Blame
export const BOOT_SHELL_DELAY = 200;

export type BootShellPhase = 'done' | 'hidden' | 'shell';

interface ResolveBootShellPhaseOptions {
  appPainted: boolean;
  appReady: boolean;
  delayElapsed: boolean;
}

export const resolveBootShellPhase = ({
  appPainted,
  appReady,
  delayElapsed,
}: ResolveBootShellPhaseOptions): BootShellPhase => {
  if (appReady && appPainted) return 'done';

  return delayElapsed ? 'shell' : 'hidden';
};