MCPcopy Create free account
hub / github.com/github/copilot-sdk / waitForExchanges

Function waitForExchanges

nodejs/test/e2e/session_config.e2e.test.ts:17–27  ·  view source on GitHub ↗
(minimumCount = 1)

Source from the content-addressed store, hash-verified

15 const { copilotClient: client, workDir, openAiEndpoint, env } = await createSdkTestContext();
16
17 async function waitForExchanges(minimumCount = 1) {
18 await retry(
19 `capture ${minimumCount} chat completion request(s)`,
20 async () => {
21 const exchanges = await openAiEndpoint.getExchanges();
22 expect(exchanges.length).toBeGreaterThanOrEqual(minimumCount);
23 },
24 1_200
25 );
26 return openAiEndpoint.getExchanges();
27 }
28
29 it("should use workingDirectory for tool execution", async () => {
30 const subDir = join(workDir, "subproject");

Callers 2

sendAndGetNextExchangeFunction · 0.70

Calls 2

retryFunction · 0.90
getExchangesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…