MCPcopy Index your code
hub / github.com/anomalyco/opencode / installDetail

Function installDetail

packages/opencode/src/plugin/tui/runtime.ts:827–846  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

825}
826
827function installDetail(err: unknown) {
828 const hit = installCause(err) ?? err
829 if (!(hit instanceof Process.RunFailedError)) {
830 return {
831 message: errorMessage(hit),
832 missing: false,
833 }
834 }
835
836 const lines = hit.stderr
837 .toString()
838 .split(/\r?\n/)
839 .map((line) => line.trim())
840 .filter(Boolean)
841 const errs = lines.filter((line) => line.startsWith("error:")).map((line) => line.replace(/^error:\s*/, ""))
842 return {
843 message: errs[0] ?? lines.at(-1) ?? errorMessage(hit),
844 missing: lines.some((line) => line.includes("No version matching")),
845 }
846}
847
848async function addPluginBySpec(state: RuntimeState | undefined, raw: string) {
849 if (!state) return false

Callers 1

installPluginBySpecFunction · 0.85

Calls 3

errorMessageFunction · 0.90
installCauseFunction · 0.85
atMethod · 0.80

Tested by

no test coverage detected