MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / findOrCreateSession

Method findOrCreateSession

lib/clientstate.ts:445–454  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

443 }
444
445 findOrCreateSession(id: number) {
446 let session = this.findSessionById(id);
447 if (session) return session;
448
449 session = new ClientStateSession();
450 session.id = id;
451 this.sessions.push(session);
452
453 return session;
454 }
455
456 findOrCreateTree(id: number) {
457 let tree = this.findTreeById(id);

Callers 8

simpleLayoutHandlerMethod · 0.95
createDefaultStateMethod · 0.95
addToolToCompilerMethod · 0.80
handleShareLinkMethod · 0.80

Calls 2

findSessionByIdMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected