MCPcopy Index your code
hub / github.com/coder/code-server / getConnectedSocketPath

Method getConnectedSocketPath

src/node/vscodeSocket.ts:131–144  ·  view source on GitHub ↗

* Returns the best socket path that we can connect to. * We also delete any sockets that we can't connect to.

(filePath: string)

Source from the content-addressed store, hash-verified

129 * We also delete any sockets that we can't connect to.
130 */
131 async getConnectedSocketPath(filePath: string): Promise<string | undefined> {
132 const candidates = this.getCandidatesForFile(filePath)
133 let match: EditorSessionEntry | undefined = undefined
134
135 for (const candidate of candidates) {
136 if (await canConnect(candidate.socketPath)) {
137 match = candidate
138 break
139 }
140 this.deleteSession(candidate.socketPath)
141 }
142
143 return match?.socketPath
144 }
145}
146
147export class EditorSessionManagerClient {

Callers 2

Calls 3

getCandidatesForFileMethod · 0.95
deleteSessionMethod · 0.95
canConnectFunction · 0.90

Tested by

no test coverage detected