import { isWsl } from "./platform.ts"; import type { NotificationInput } from "./notify-protocol.ts"; import { resolveLinuxDesktopCommand } from "./notify-linux.ts"; import { resolveWindowsDesktopCommand } from "./notify-windows.ts"; import type { Runtime } from "./runtime.ts"; export { isWsl }; export function resolveWslDesktopCommand(input: NotificationInput, runtime: Runtime): { command: string; args: string[] } | null { const powershell = resolveWindowsDesktopCommand(input, runtime); if (powershell) return powershell; return resolveLinuxDesktopCommand(input, runtime); } export function sendWslDesktopNotification(input: NotificationInput, runtime: Runtime): boolean { const resolved = resolveWslDesktopCommand(input, runtime); if (!resolved) return false; runtime.spawnDetached(resolved.command, resolved.args); return true; }