@@ -32,7 +32,6 @@ describe('copilotProviders Tests', () => {
3232 const rootUri : vscode . Uri = vscode . Uri . file ( process . platform === 'win32' ? 'C:\\src\\my_project' : '/home/src/my_project' ) ;
3333 const expectedInclude : string = process . platform === 'win32' ? 'file:///c%3A/src/my_project/foo.h' : 'file:///home/src/my_project/foo.h' ;
3434 const sourceFileUri : vscode . Uri = vscode . Uri . file ( process . platform === 'win32' ? 'file:///c%3A/src/my_project/foo.cpp' : 'file:///home/src/my_project/foo.cpp' ) ;
35- const maxDepth : number = 10 ;
3635
3736 beforeEach ( ( ) => {
3837 proxyquire . noPreserveCache ( ) ; // Tells proxyquire to not fetch the module from cache
@@ -73,7 +72,7 @@ describe('copilotProviders Tests', () => {
7372
7473 activeClientStub = sinon . createStubInstance ( DefaultClient ) ;
7574 getActiveClientStub = sinon . stub ( extension , 'getActiveClient' ) . returns ( activeClientStub ) ;
76- activeClientStub . getIncludes . resolves ( { includedFiles : [ ] } ) ( sourceFileUri , maxDepth ) ;
75+ activeClientStub . getIncludes . resolves ( { includedFiles : [ ] } ) ;
7776 telemetryStub = sinon . stub ( telemetry , 'logCopilotEvent' ) . returns ( ) ;
7877 } ) ;
7978
@@ -85,14 +84,14 @@ describe('copilotProviders Tests', () => {
8584 { vscodeExtension ?: vscode . Extension < unknown > ; getIncludeFiles ?: GetIncludesResult ; projectContext ?: ProjectContext ; rootUri ?: vscode . Uri ; flags ?: Record < string , unknown > } =
8685 { vscodeExtension : undefined , getIncludeFiles : undefined , projectContext : undefined , rootUri : undefined , flags : { } }
8786 ) => {
88- activeClientStub . getIncludes . resolves ( getIncludeFiles ) ( sourceFileUri , maxDepth ) ;
87+ activeClientStub . getIncludes . resolves ( getIncludeFiles ) ;
8988 sinon . stub ( lmTool , 'getProjectContext' ) . resolves ( projectContext ) ;
9089 sinon . stub ( activeClientStub , 'RootUri' ) . get ( ( ) => rootUri ) ;
9190 mockCopilotApi . registerRelatedFilesProvider . callsFake ( ( _providerId : { extensionId : string ; languageId : string } , callback : ( uri : vscode . Uri , context : { flags : Record < string , unknown > } , cancellationToken : vscode . CancellationToken ) => Promise < { entries : vscode . Uri [ ] ; traits ?: CopilotTrait [ ] } > ) => {
9291 if ( _providerId . languageId === 'cpp' ) {
9392 const tokenSource = new vscode . CancellationTokenSource ( ) ;
9493 try {
95- callbackPromise = callback ( vscode . Uri . parse ( 'file:///test-extension-path' ) , { flags : flags ?? { } } , tokenSource . token ) ;
94+ callbackPromise = callback ( sourceFileUri , { flags : flags ?? { } } , tokenSource . token ) ;
9695 } finally {
9796 tokenSource . dispose ( ) ;
9897 }
0 commit comments