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

Function getPortFilePaths

src/cm/lsp/serverLauncher.ts:126–136  ·  view source on GitHub ↗

* Get the port file path for a given server and session. * Port file format: ~/.axs/lsp_ports/{serverName}_{session}

(
  serverName: string,
  session: string,
)

Source from the content-addressed store, hash-verified

124 * Port file format: ~/.axs/lsp_ports/{serverName}_{session}
125 */
126async function getPortFilePaths(
127 serverName: string,
128 session: string,
129): Promise<string[]> {
130 const dataDirs = await getTerminalDataDirs();
131 // Use just the binary name (not full path), mirroring axs behavior
132 const baseName = serverName.split("/").pop() || serverName;
133 return dataDirs.map(
134 (dataDir) => `file://${dataDir}/.axs/lsp_ports/${baseName}_${session}`,
135 );
136}
137
138/**
139 * Read the port from a port file using the filesystem API.

Callers 1

getLspPortFunction · 0.85

Calls 1

getTerminalDataDirsFunction · 0.85

Tested by

no test coverage detected