MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / check

Function check

src/lib/openFolder.js:553–561  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

551 new Promise((resolve, reject) => {
552 const startTime = Date.now();
553 const check = () => {
554 if (terminal.component.isConnected) {
555 resolve();
556 } else if (Date.now() - startTime > timeoutMs) {
557 reject(new Error("Terminal connection timeout"));
558 } else {
559 setTimeout(check, 50);
560 }
561 };
562 check();
563 });
564 await waitForConnection();

Callers 1

waitForConnectionFunction · 0.70

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected