GHHG10's picture
download
raw
930 Bytes
import type { WslServersState } from "@opencode-ai/app/wsl/types"
export function readyWslConnections(state?: WslServersState) {
return (state?.servers ?? []).flatMap((item) => {
if (item.runtime.kind !== "ready") return []
return [
{
displayName: item.config.distro,
label: "WSL",
type: "sidecar" as const,
variant: "wsl" as const,
distro: item.config.distro,
http: {
url: item.runtime.url,
username: item.runtime.username ?? undefined,
password: item.runtime.password ?? undefined,
},
},
]
})
}
export function availableStartupServer(defaultServer: string | null | undefined, state?: WslServersState) {
const key = defaultServer ?? "sidecar"
if (!key.startsWith("wsl:")) return key
if (state?.servers.some((item) => item.config.id === key && item.runtime.kind === "ready")) return key
return "sidecar"
}

Xet Storage Details

Size:
930 Bytes
·
Xet hash:
39d11a7ab842ca61f980a182d39b137af4c19cf6bb641a05bb2ed3d5d6d595d3

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.