Buckets:
| import type { WslDistroProbe, WslOpencodeCheck, WslServerItem } from "../../preload/types" | |
| export function wslServerIdToRestart(servers: WslServerItem[], distro: string) { | |
| return servers.find((item) => item.config.distro === distro)?.config.id | |
| } | |
| export function clearWslDistroState( | |
| distroProbes: Record<string, WslDistroProbe>, | |
| opencodeChecks: Record<string, WslOpencodeCheck>, | |
| distro: string, | |
| ) { | |
| const nextDistroProbes = { ...distroProbes } | |
| const nextOpencodeChecks = { ...opencodeChecks } | |
| delete nextDistroProbes[distro] | |
| delete nextOpencodeChecks[distro] | |
| return { distroProbes: nextDistroProbes, opencodeChecks: nextOpencodeChecks } | |
| } | |
| export function wslTerminalArgs(distro?: string | null) { | |
| return ["/c", "start", "", "wsl", ...(distro ? ["-d", distro] : [])] | |
| } | |
| export function requireWslIpcString(name: string, value: unknown) { | |
| if (typeof value === "string" && value.length > 0) return value | |
| throw new Error(`Invalid ${name}`) | |
| } | |
Xet Storage Details
- Size:
- 965 Bytes
- Xet hash:
- 21c483dea83695905fcc32930e8813da6c7db11fbef95c91f821c618470e1415
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.