@@ -39,7 +39,6 @@ import { IHoverService } from '../../../../platform/hover/browser/hover.js';
3939import { IInstantiationService , ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js' ;
4040import { ILabelService } from '../../../../platform/label/common/label.js' ;
4141import { IOpenerService , OpenInternalOptions } from '../../../../platform/opener/common/opener.js' ;
42- import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js' ;
4342import { FolderThemeIcon , IThemeService } from '../../../../platform/theme/common/themeService.js' ;
4443import { fillEditorsDragData } from '../../../browser/dnd.js' ;
4544import { IFileLabelOptions , IResourceLabel , ResourceLabels } from '../../../browser/labels.js' ;
@@ -257,7 +256,6 @@ export class ImageAttachmentWidget extends AbstractChatAttachmentWidget {
257256 @IOpenerService openerService : IOpenerService ,
258257 @IHoverService private readonly hoverService : IHoverService ,
259258 @ILanguageModelsService private readonly languageModelsService : ILanguageModelsService ,
260- @ITelemetryService private readonly telemetryService : ITelemetryService ,
261259 @IInstantiationService instantiationService : IInstantiationService ,
262260 @ILabelService private readonly labelService : ILabelService ,
263261 ) {
@@ -279,24 +277,8 @@ export class ImageAttachmentWidget extends AbstractChatAttachmentWidget {
279277 await this . openResource ( resource , false , undefined ) ;
280278 }
281279 } ;
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- } ;
292280
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' ;
300282
301283 const fullName = resource ? this . labelService . getUriLabel ( resource ) : ( attachment . fullName || attachment . name ) ;
302284 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