Skip to content

Commit 0baebaf

Browse files
committed
Update generated RPC files after schema refresh
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a09710c commit 0baebaf

9 files changed

Lines changed: 18296 additions & 5341 deletions

File tree

go/rpc/zrpc.go

Lines changed: 430 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodejs/src/generated/rpc.ts

Lines changed: 5107 additions & 577 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodejs/src/generated/session-events.ts

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodejs/test/e2e/commands.e2e.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { afterAll, describe, expect, it } from "vitest";
66
import { CopilotClient, approveAll } from "../../src/index.js";
77
import type { SessionEvent } from "../../src/index.js";
88
import { createSdkTestContext } from "./harness/sdkTestContext.js";
9+
import { markInactiveForResume } from "./harness/sdkTestHelper.js";
910

1011
describe("Commands", async () => {
1112
// Use TCP mode so a second client can connect to the same CLI process
@@ -83,7 +84,7 @@ describe("Commands", async () => {
8384
it("session with commands resumes successfully", async () => {
8485
const session1 = await client1.createSession({ onPermissionRequest: approveAll });
8586
const sessionId = session1.sessionId;
86-
await session1.disconnect();
87+
markInactiveForResume(session1);
8788

8889
const session2 = await client1.resumeSession(sessionId, {
8990
onPermissionRequest: approveAll,

nodejs/test/e2e/harness/sdkTestHelper.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,7 @@ export function getNextEventOfType(
130130
});
131131
});
132132
}
133+
134+
export function markInactiveForResume(session: CopilotSession): void {
135+
session._markDisconnected();
136+
}

nodejs/test/e2e/session.e2e.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import { describe, expect, it, onTestFinished, vi } from "vitest";
33
import { ParsedHttpExchange } from "../../../test/harness/replayingCapiProxy.js";
44
import { CopilotClient, approveAll, defineTool } from "../../src/index.js";
55
import { createSdkTestContext, isCI } from "./harness/sdkTestContext.js";
6-
import { getFinalAssistantMessage, getNextEventOfType } from "./harness/sdkTestHelper.js";
6+
import {
7+
getFinalAssistantMessage,
8+
getNextEventOfType,
9+
markInactiveForResume,
10+
} from "./harness/sdkTestHelper.js";
711

812
describe("Sessions", async () => {
913
const {
@@ -354,7 +358,7 @@ describe("Sessions", async () => {
354358
it("should resume session with a custom provider", async () => {
355359
const session = await client.createSession({ onPermissionRequest: approveAll });
356360
const sessionId = session.sessionId;
357-
await session.disconnect();
361+
markInactiveForResume(session);
358362

359363
// Resume the session with a provider
360364
const session2 = await client.resumeSession(sessionId, {

nodejs/test/e2e/session_config.e2e.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { writeFile, mkdir } from "fs/promises";
33
import { join } from "path";
44
import { approveAll } from "../../src/index.js";
55
import { createSdkTestContext } from "./harness/sdkTestContext.js";
6+
import { markInactiveForResume } from "./harness/sdkTestHelper.js";
67

78
describe("Session Configuration", async () => {
89
const { copilotClient: client, workDir, openAiEndpoint } = await createSdkTestContext();
@@ -247,7 +248,7 @@ describe("Session Configuration", async () => {
247248
onPermissionRequest: approveAll,
248249
workingDirectory: projectDir,
249250
});
250-
await session1.disconnect();
251+
markInactiveForResume(session1);
251252
const session2 = await client.resumeSession(session1.sessionId, {
252253
onPermissionRequest: approveAll,
253254
workingDirectory: projectDir,
@@ -305,7 +306,7 @@ describe("Session Configuration", async () => {
305306
it("should forward custom provider headers on resume", async () => {
306307
const session1 = await client.createSession({ onPermissionRequest: approveAll });
307308
const sessionId = session1.sessionId;
308-
await session1.disconnect();
309+
markInactiveForResume(session1);
309310

310311
const session2 = await client.resumeSession(sessionId, {
311312
onPermissionRequest: approveAll,
@@ -386,7 +387,7 @@ describe("Session Configuration", async () => {
386387

387388
const session1 = await client.createSession({ onPermissionRequest: approveAll });
388389
const sessionId = session1.sessionId;
389-
await session1.disconnect();
390+
markInactiveForResume(session1);
390391

391392
const session2 = await client.resumeSession(sessionId, {
392393
onPermissionRequest: approveAll,
@@ -404,7 +405,7 @@ describe("Session Configuration", async () => {
404405
it("should apply systemMessage on session resume", async () => {
405406
const session1 = await client.createSession({ onPermissionRequest: approveAll });
406407
const sessionId = session1.sessionId;
407-
await session1.disconnect();
408+
markInactiveForResume(session1);
408409

409410
const resumeInstruction = "End the response with RESUME_SYSTEM_MESSAGE_SENTINEL.";
410411
const session2 = await client.resumeSession(sessionId, {
@@ -426,7 +427,7 @@ describe("Session Configuration", async () => {
426427
it("should apply availableTools on session resume", async () => {
427428
const session1 = await client.createSession({ onPermissionRequest: approveAll });
428429
const sessionId = session1.sessionId;
429-
await session1.disconnect();
430+
markInactiveForResume(session1);
430431

431432
const session2 = await client.resumeSession(sessionId, {
432433
onPermissionRequest: approveAll,

0 commit comments

Comments
 (0)