@@ -39,7 +39,6 @@ import { IHoverService } from '../../../../platform/hover/browser/hover.js';
39
39
import { IInstantiationService , ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js' ;
40
40
import { ILabelService } from '../../../../platform/label/common/label.js' ;
41
41
import { IOpenerService , OpenInternalOptions } from '../../../../platform/opener/common/opener.js' ;
42
- import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js' ;
43
42
import { FolderThemeIcon , IThemeService } from '../../../../platform/theme/common/themeService.js' ;
44
43
import { fillEditorsDragData } from '../../../browser/dnd.js' ;
45
44
import { IFileLabelOptions , IResourceLabel , ResourceLabels } from '../../../browser/labels.js' ;
@@ -257,7 +256,6 @@ export class ImageAttachmentWidget extends AbstractChatAttachmentWidget {
257
256
@IOpenerService openerService : IOpenerService ,
258
257
@IHoverService private readonly hoverService : IHoverService ,
259
258
@ILanguageModelsService private readonly languageModelsService : ILanguageModelsService ,
260
- @ITelemetryService private readonly telemetryService : ITelemetryService ,
261
259
@IInstantiationService instantiationService : IInstantiationService ,
262
260
@ILabelService private readonly labelService : ILabelService ,
263
261
) {
@@ -279,24 +277,8 @@ export class ImageAttachmentWidget extends AbstractChatAttachmentWidget {
279
277
await this . openResource ( resource , false , undefined ) ;
280
278
}
281
279
} ;
282
- type AttachImageEvent = {
283
- currentModel : string ;
284
- supportsVision : boolean ;
285
- } ;
286
- type AttachImageEventClassification = {
287
- currentModel : { classification : 'SystemMetaData' ; purpose : 'FeatureInsight' ; comment : 'The model at the point of attaching the image.' } ;
288
- supportsVision : { classification : 'SystemMetaData' ; purpose : 'FeatureInsight' ; comment : 'Whether the current model supports vision or not.' } ;
289
- owner : 'justschen' ;
290
- comment : 'Event used to gain insights when images are attached, and if the model supported vision or not.' ;
291
- } ;
292
280
293
- const currentLanguageModelName = this . currentLanguageModel ? this . languageModelsService . lookupLanguageModel ( this . currentLanguageModel . identifier ) ?. name ?? this . currentLanguageModel . identifier : 'unknown' ;
294
- const supportsVision = this . modelSupportsVision ( ) ;
295
-
296
- this . telemetryService . publicLog2 < AttachImageEvent , AttachImageEventClassification > ( 'copilot.attachImage' , {
297
- currentModel : currentLanguageModelName ,
298
- supportsVision : supportsVision
299
- } ) ;
281
+ const currentLanguageModelName = this . currentLanguageModel ? this . languageModelsService . lookupLanguageModel ( this . currentLanguageModel . identifier ) ?. name ?? this . currentLanguageModel . identifier : 'Current model' ;
300
282
301
283
const fullName = resource ? this . labelService . getUriLabel ( resource ) : ( attachment . fullName || attachment . name ) ;
302
284
this . _register ( createImageElements ( resource , attachment . name , fullName , this . element , attachment . value as Uint8Array , this . hoverService , ariaLabel , currentLanguageModelName , clickHandler , this . currentLanguageModel , attachment . omittedState ) ) ;
0 commit comments