@@ -3,6 +3,7 @@ import { writeFile, mkdir } from "fs/promises";
33import { join } from "path" ;
44import { approveAll } from "../../src/index.js" ;
55import { createSdkTestContext } from "./harness/sdkTestContext.js" ;
6+ import { markInactiveForResume } from "./harness/sdkTestHelper.js" ;
67
78describe ( "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