MCPcopy
hub / github.com/anomalyco/opencode / wslServerIdToRestart

Function wslServerIdToRestart

packages/desktop/src/main/wsl/policy.ts:3–5  ·  view source on GitHub ↗
(servers: WslServerItem[], distro: string)

Source from the content-addressed store, hash-verified

1import type { WslDistroProbe, WslOpencodeCheck, WslServerItem } from "../../preload/types"
2
3export function wslServerIdToRestart(servers: WslServerItem[], distro: string) {
4 return servers.find((item) => item.config.distro === distro)?.config.id
5}
6
7export function clearWslDistroState(
8 distroProbes: Record<string, WslDistroProbe>,

Callers 2

installOpencodeFunction · 0.90
servers.test.tsFile · 0.90

Calls 1

findMethod · 0.65

Tested by

no test coverage detected