@@ -398,14 +398,15 @@ func TestClient_ForwardsNewSessionOptionsToSessionRequests(t *testing.T) {
398398 })
399399
400400 _ , err := client .CreateSession (t .Context (), & SessionConfig {
401- ExcludedBuiltInAgents : []string {"explore" },
402- EnableCitations : Bool (true ),
403- SessionLimits : & rpc.SessionLimitsConfig {MaxAiCredits : float64Ptr (30 )},
401+ ExcludedBuiltInAgents : []string {"explore" },
402+ EnableCitations : Bool (true ),
403+ EnableFileChangeTracking : Bool (true ),
404+ SessionLimits : & rpc.SessionLimitsConfig {MaxAiCredits : float64Ptr (30 )},
404405 })
405406 if err != nil {
406407 t .Fatalf ("CreateSession failed: %v" , err )
407408 }
408- assertNewSessionOptions (t , <- createParams , true , "explore" , 30 )
409+ assertNewSessionOptions (t , <- createParams , true , true , "explore" , 30 )
409410
410411 resumeParams := make (chan json.RawMessage , 1 )
411412 server .SetRequestHandler ("session.resume" , func (params json.RawMessage ) (json.RawMessage , * jsonrpc2.Error ) {
@@ -414,14 +415,15 @@ func TestClient_ForwardsNewSessionOptionsToSessionRequests(t *testing.T) {
414415 })
415416
416417 _ , err = client .ResumeSessionWithOptions (t .Context (), "resumed-options" , & ResumeSessionConfig {
417- ExcludedBuiltInAgents : []string {"task" },
418- EnableCitations : Bool (false ),
419- SessionLimits : & rpc.SessionLimitsConfig {MaxAiCredits : float64Ptr (15 )},
418+ ExcludedBuiltInAgents : []string {"task" },
419+ EnableCitations : Bool (false ),
420+ EnableFileChangeTracking : Bool (false ),
421+ SessionLimits : & rpc.SessionLimitsConfig {MaxAiCredits : float64Ptr (15 )},
420422 })
421423 if err != nil {
422424 t .Fatalf ("ResumeSessionWithOptions failed: %v" , err )
423425 }
424- assertNewSessionOptions (t , <- resumeParams , false , "task" , 15 )
426+ assertNewSessionOptions (t , <- resumeParams , false , false , "task" , 15 )
425427}
426428
427429func assertCapiEnableWebSocketResponses (t * testing.T , params json.RawMessage ) {
@@ -445,6 +447,7 @@ func assertNewSessionOptions(
445447 t * testing.T ,
446448 params json.RawMessage ,
447449 expectedCitations bool ,
450+ expectedFileChangeTracking bool ,
448451 expectedAgent string ,
449452 expectedCredits float64 ,
450453) {
@@ -457,6 +460,9 @@ func assertNewSessionOptions(
457460 if decoded ["enableCitations" ] != expectedCitations {
458461 t .Fatalf ("expected enableCitations=%v, got %v" , expectedCitations , decoded ["enableCitations" ])
459462 }
463+ if decoded ["enableFileChangeTracking" ] != expectedFileChangeTracking {
464+ t .Fatalf ("expected enableFileChangeTracking=%v, got %v" , expectedFileChangeTracking , decoded ["enableFileChangeTracking" ])
465+ }
460466 agents , ok := decoded ["excludedBuiltinAgents" ].([]any )
461467 if ! ok || len (agents ) != 1 || agents [0 ] != expectedAgent {
462468 t .Fatalf ("expected excludedBuiltinAgents=[%q], got %#v" , expectedAgent , decoded ["excludedBuiltinAgents" ])
0 commit comments