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

Function stopServer

src/components/lspInfoDialog/index.js:106–125  ·  view source on GitHub ↗
(serverId)

Source from the content-addressed store, hash-verified

104}
105
106async function stopServer(serverId) {
107 addLspLog(serverId, "info", "Stop requested by user");
108 toast("Stopping...");
109
110 try {
111 const clientState = getClientState(serverId);
112 if (clientState) {
113 await clientState.dispose();
114 }
115
116 const { stopManagedServer } = await import("cm/lsp/serverLauncher");
117 stopManagedServer(serverId);
118
119 addLspLog(serverId, "info", "Server stopped");
120 toast("Server stopped");
121 } catch (err) {
122 addLspLog(serverId, "error", `Stop failed: ${err.message}`);
123 toast("Failed to stop");
124 }
125}
126
127async function startAllServers() {
128 toast("Starting LSP servers...");

Callers

nothing calls this directly

Calls 4

addLspLogFunction · 0.90
getClientStateFunction · 0.85
stopManagedServerFunction · 0.85
disposeMethod · 0.45

Tested by

no test coverage detected