MCPcopy Create free account
hub / github.com/disler/pi-vs-claude-code / getOrCreateProject

Function getOrCreateProject

scripts/coms-net-server.ts:387–400  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

385};
386
387function getOrCreateProject(name: string): ProjectState {
388 let p = state.projects.get(name);
389 if (!p) {
390 p = {
391 agents: new Map(),
392 nameIndex: new Map(),
393 messages: new Map(),
394 streams: new Map(),
395 awaiters: new Map(),
396 };
397 state.projects.set(name, p);
398 }
399 return p;
400}
401
402function nameIndexAdd(p: ProjectState, name: string, sessionId: string): void {
403 let bag = p.nameIndex.get(name);

Callers 2

handleRegisterFunction · 0.85
handleEventsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected