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

Method addSession

src/node/vscodeSocket.ts:187–205  ·  view source on GitHub ↗
(request: AddSessionRequest)

Source from the content-addressed store, hash-verified

185
186 // Currently only used for tests.
187 async addSession(request: AddSessionRequest): Promise<void> {
188 await new Promise<void>((resolve, reject) => {
189 const opts = {
190 path: "/add-session",
191 socketPath: this.codeServerSocketPath,
192 method: "POST",
193 headers: {
194 "content-type": "application/json",
195 accept: "application/json",
196 },
197 }
198 const req = http.request(opts, () => {
199 resolve()
200 })
201 req.on("error", reject)
202 req.write(JSON.stringify(request))
203 req.end()
204 })
205 }
206}

Callers

nothing calls this directly

Calls 3

resolveFunction · 0.85
requestMethod · 0.80
writeMethod · 0.80

Tested by

no test coverage detected