MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / installRuntimeServer

Function installRuntimeServer

src/cm/lsp/runtimeActions.ts:51–63  ·  view source on GitHub ↗
(
	server: LspServerDefinition,
	mode: "install" | "update" | "reinstall" = "install",
	options: { promptConfirm?: boolean } = {},
	context?: LspRuntimeContext,
)

Source from the content-addressed store, hash-verified

49}
50
51export async function installRuntimeServer(
52 server: LspServerDefinition,
53 mode: "install" | "update" | "reinstall" = "install",
54 options: { promptConfirm?: boolean } = {},
55 context?: LspRuntimeContext,
56): Promise<boolean> {
57 const settingsContext = getSettingsContext(server, context, "install");
58 const provider = await getProvider(server, context, "install");
59 if (!provider?.install) {
60 throw new Error("The selected runtime does not support installation.");
61 }
62 return provider.install(server, settingsContext, mode, options);
63}
64
65export async function uninstallRuntimeServer(
66 server: LspServerDefinition,

Callers 1

callbackFunction · 0.90

Calls 3

getSettingsContextFunction · 0.85
getProviderFunction · 0.85
installMethod · 0.80

Tested by

no test coverage detected