@@ -33,11 +33,22 @@ import { CppSettings } from './settings';
3333import { LanguageStatusUI , getUI } from './ui' ;
3434import { makeLspRange , rangeEquals , showInstallCompilerWalkthrough } from './utils' ;
3535
36+ interface CopilotTrait {
37+ name : string ;
38+ value : string ;
39+ includeInPrompt ?: boolean ;
40+ promptTextOverride ?: string ;
41+ }
42+
3643interface CopilotApi {
3744 registerRelatedFilesProvider (
3845 providerId : { extensionId : string ; languageId : string } ,
39- callback : ( uri : vscode . Uri , token : vscode . CancellationToken ) => Promise < { entries : vscode . Uri [ ] ; traits ?: { name : string ; value : string } [ ] } >
40- ) : vscode . Disposable ;
46+ callback : (
47+ uri : vscode . Uri ,
48+ context : { flags : Record < string , unknown > } ,
49+ cancellationToken : vscode . CancellationToken
50+ ) => Promise < { entries : vscode . Uri [ ] ; traits ?: CopilotTrait [ ] } >
51+ ) : Disposable ;
4152}
4253
4354nls . config ( { messageFormat : nls . MessageFormat . bundle , bundleFormat : nls . BundleFormat . standalone } ) ( ) ;
@@ -270,7 +281,7 @@ export async function activate(): Promise<void> {
270281 for ( const languageId of [ 'c' , 'cpp' , 'cuda-cpp' ] ) {
271282 api . registerRelatedFilesProvider (
272283 { extensionId : util . extensionContext . extension . id , languageId } ,
273- async ( _uri : vscode . Uri , token : vscode . CancellationToken ) =>
284+ async ( _uri : vscode . Uri , _context : { flags : Record < string , unknown > } , token : vscode . CancellationToken ) =>
274285 ( { entries : ( await clients . ActiveClient . getIncludes ( 1 , token ) ) ?. includedFiles . map ( file => vscode . Uri . file ( file ) ) ?? [ ] } )
275286 ) ;
276287 }
0 commit comments