Skip to content

Commit 3318398

Browse files
authored
remove redundant telemetry (microsoft#257526)
* remove redundant telemetry * remove unused service * remove another service
1 parent b221cf0 commit 3318398

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import { IHoverService } from '../../../../platform/hover/browser/hover.js';
3939
import { IInstantiationService, ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';
4040
import { ILabelService } from '../../../../platform/label/common/label.js';
4141
import { IOpenerService, OpenInternalOptions } from '../../../../platform/opener/common/opener.js';
42-
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';
4342
import { FolderThemeIcon, IThemeService } from '../../../../platform/theme/common/themeService.js';
4443
import { fillEditorsDragData } from '../../../browser/dnd.js';
4544
import { 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

Comments
 (0)