MCPcopy Create free account
hub / github.com/anomalyco/opencode / refreshOpencodeChecks

Function refreshOpencodeChecks

packages/desktop/src/main/wsl/servers.ts:183–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181 }
182
183 const refreshOpencodeChecks = async () => {
184 await Promise.all(
185 state.servers.map((item) =>
186 checkOpencode(item.config.distro)
187 .then((check) => {
188 if (!hasServer(item.config.id, item.config.distro)) return
189 setOpencodeCheck(item.config.distro, check)
190 })
191 .catch((error) => {
192 const message = error instanceof Error ? error.message : String(error)
193 logger?.error("wsl opencode check failed", {
194 id: item.config.id,
195 distro: item.config.distro,
196 message,
197 })
198 }),
199 ),
200 )
201 }
202
203 const refreshDistroLists = async (opts: { signal?: AbortSignal }) => {
204 const [installed, online] = await Promise.all([listInstalledWslDistros(opts), listOnlineWslDistros(opts)])

Callers 1

initializeFunction · 0.85

Calls 4

checkOpencodeFunction · 0.85
hasServerFunction · 0.85
setOpencodeCheckFunction · 0.85
allMethod · 0.45

Tested by

no test coverage detected