Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

458 B
Raw Blame
"use client";

import { useEffect, useState } from "react";
import { createIntentPrefetch } from "../lib/intent-prefetch";

/** One pending intent per surface; cancel on close, pointer leave, blur or unmount. */
export function useIntentPrefetch(enabled = true) {
  const [prefetch] = useState(() => createIntentPrefetch());
  useEffect(() => {
    if (!enabled) prefetch.cancel();
    return prefetch.cancel;
  }, [enabled, prefetch]);
  return prefetch;
}