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

Function installOpencode

packages/desktop/src/main/wsl/servers.ts:361–372  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

359 },
360
361 async installOpencode(name: string) {
362 await runJob({ kind: "install-opencode", distro: name, startedAt: Date.now() }, async (abort) => {
363 const result = await installWslOpencode(appVersion, name, { signal: abort.signal })
364 if (result.code !== 0) {
365 throw new Error(summarize(result.stderr || result.stdout) || "OpenCode installation failed")
366 }
367 await refreshOpencodeCheck(name, { signal: abort.signal })
368 expectOpencodeVersion(state.opencodeChecks[name]?.version ?? null, appVersion, name)
369 const id = wslServerIdToRestart(state.servers, name)
370 if (id) await startServer(id)
371 })
372 },
373
374 async openTerminal(name: string) {
375 await openWslTerminal(name)

Callers

nothing calls this directly

Calls 7

installWslOpencodeFunction · 0.90
summarizeFunction · 0.90
expectOpencodeVersionFunction · 0.90
wslServerIdToRestartFunction · 0.90
runJobFunction · 0.85
refreshOpencodeCheckFunction · 0.85
startServerFunction · 0.85

Tested by

no test coverage detected