@@ -12,10 +12,10 @@ import { IEnvService } from '../../env/common/envService';
12
12
import { packageJson } from '../../env/common/packagejson' ;
13
13
import { IVSCodeExtensionContext } from '../../extContext/common/extensionContext' ;
14
14
import { ILogService } from '../../log/common/logService' ;
15
- import { ITelemetryService } from '../common/telemetry' ;
16
- import { BaseExperimentationService , UserInfoStore } from '../node/baseExperimentationService' ;
17
15
import { IFetcherService } from '../../networking/common/fetcherService' ;
18
16
import { FetcherService } from '../../networking/vscode-node/fetcherServiceImpl' ;
17
+ import { ITelemetryService } from '../common/telemetry' ;
18
+ import { BaseExperimentationService , UserInfoStore } from '../node/baseExperimentationService' ;
19
19
20
20
function getTargetPopulation ( isPreRelease : boolean ) : TargetPopulation {
21
21
if ( isPreRelease ) {
@@ -136,6 +136,16 @@ class GithubAccountFilterProvider implements IExperimentationFilterProvider {
136
136
137
137
}
138
138
139
+ class DevDeviceIdFilterProvider implements IExperimentationFilterProvider {
140
+ constructor ( private _devDeviceId : string ) { }
141
+
142
+ getFilters ( ) : Map < string , any > {
143
+ const filters = new Map < string , any > ( ) ;
144
+ filters . set ( 'X-VSCode-DevDeviceId' , this . _devDeviceId ) ;
145
+ return filters ;
146
+ }
147
+ }
148
+
139
149
export class MicrosoftExperimentationService extends BaseExperimentationService {
140
150
constructor (
141
151
@ITelemetryService telemetryService : ITelemetryService ,
@@ -163,7 +173,8 @@ export class MicrosoftExperimentationService extends BaseExperimentationService
163
173
new RelatedExtensionsFilterProvider ( logService ) ,
164
174
new CopilotExtensionsFilterProvider ( logService ) ,
165
175
// The callback is called in super ctor. At that time, self/this is not initialized yet (but also, no filter could have been possibly set).
166
- new CopilotCompletionsFilterProvider ( ( ) => self ?. getCompletionsFilters ( ) ?? new Map ( ) , logService )
176
+ new CopilotCompletionsFilterProvider ( ( ) => self ?. getCompletionsFilters ( ) ?? new Map ( ) , logService ) ,
177
+ new DevDeviceIdFilterProvider ( vscode . env . devDeviceId )
167
178
) ;
168
179
} ;
169
180
0 commit comments