MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / tick

Function tick

__tests__/mcp-roots.test.ts:61–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 return new Promise((resolve, reject) => {
60 const started = Date.now();
61 const tick = () => {
62 const hit = messages.find(predicate);
63 if (hit) return resolve(hit);
64 if (Date.now() - started > timeoutMs) {
65 return reject(new Error(`Timed out. Messages so far: ${JSON.stringify(messages)}`));
66 }
67 setTimeout(tick, 20);
68 };
69 tick();
70 });
71}

Callers 1

waitForMessageFunction · 0.70

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected