Something went wrong. Try again.
fork of prime agent with changes i want but are not upstreamable probqbly (and some fixes)
Something went wrong. Try again.
553 B · 17 lines
TypeScript
at main
123456789101112131415161718import { createRequire } from "module";import { type ClipboardModule, loadBundledClipboard } from "./clipboard-binary-binding.js";
const require = createRequire(import.meta.url);let clipboard: ClipboardModule | null = null;
const hasDisplay = process.platform !== "linux" || Boolean(process.env.DISPLAY || process.env.WAYLAND_DISPLAY);
if (!process.env.TERMUX_VERSION && hasDisplay) { try { clipboard = loadBundledClipboard() ?? (require("@mariozechner/clipboard") as ClipboardModule); } catch { clipboard = null; }}
export { clipboard };