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

Function getServerStatus

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

Source from the content-addressed store, hash-verified

22}
23
24function getServerStatus(serverId) {
25 const activeClients = getActiveClients();
26 const client = activeClients.find((c) => c.server?.id === serverId);
27 if (!client) return "stopped";
28 try {
29 return client.client?.connected !== false ? "active" : "connecting";
30 } catch {
31 return "stopped";
32 }
33}
34
35function getClientState(serverId) {
36 const activeClients = getActiveClients();

Callers 1

index.jsFile · 0.85

Calls 1

getActiveClientsFunction · 0.85

Tested by

no test coverage detected