mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 04:36:23 +00:00
Merge pull request #241508 from mjbvz/regulatory-haddock
Remove no longer needed logging
This commit is contained in:
@@ -10,9 +10,6 @@ import { URI } from '../../../base/common/uri.js';
|
||||
import { generateUuid } from '../../../base/common/uuid.js';
|
||||
import { IConfigurationService } from '../../../platform/configuration/common/configuration.js';
|
||||
import { IStorageService } from '../../../platform/storage/common/storage.js';
|
||||
import { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';
|
||||
import { MainThreadWebviews, reviveWebviewContentOptions, reviveWebviewExtension } from './mainThreadWebviews.js';
|
||||
import * as extHostProtocol from '../common/extHost.protocol.js';
|
||||
import { DiffEditorInput } from '../../common/editor/diffEditorInput.js';
|
||||
import { EditorInput } from '../../common/editor/editorInput.js';
|
||||
import { ExtensionKeyedWebviewOriginStore, WebviewOptions } from '../../contrib/webview/browser/webview.js';
|
||||
@@ -24,6 +21,8 @@ import { GroupLocation, GroupsOrder, IEditorGroup, IEditorGroupsService, preferr
|
||||
import { ACTIVE_GROUP, IEditorService, PreferredGroup, SIDE_GROUP } from '../../services/editor/common/editorService.js';
|
||||
import { IExtensionService } from '../../services/extensions/common/extensions.js';
|
||||
import { IExtHostContext } from '../../services/extensions/common/extHostCustomers.js';
|
||||
import * as extHostProtocol from '../common/extHost.protocol.js';
|
||||
import { MainThreadWebviews, reviveWebviewContentOptions, reviveWebviewExtension } from './mainThreadWebviews.js';
|
||||
|
||||
/**
|
||||
* Bi-directional map between webview handles and inputs.
|
||||
@@ -98,7 +97,6 @@ export class MainThreadWebviewPanels extends Disposable implements extHostProtoc
|
||||
@IEditorService private readonly _editorService: IEditorService,
|
||||
@IExtensionService extensionService: IExtensionService,
|
||||
@IStorageService storageService: IStorageService,
|
||||
@ITelemetryService private readonly _telemetryService: ITelemetryService,
|
||||
@IWebviewWorkbenchService private readonly _webviewWorkbenchService: IWebviewWorkbenchService,
|
||||
) {
|
||||
super();
|
||||
@@ -174,20 +172,6 @@ export class MainThreadWebviewPanels extends Disposable implements extHostProtoc
|
||||
}, this.webviewPanelViewType.fromExternal(viewType), initData.title, mainThreadShowOptions);
|
||||
|
||||
this.addWebviewInput(handle, webview, { serializeBuffersForPostMessage: initData.serializeBuffersForPostMessage });
|
||||
|
||||
const payload = {
|
||||
extensionId: extension.id.value,
|
||||
viewType
|
||||
} as const;
|
||||
|
||||
type Classification = {
|
||||
extensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Id of the extension that created the webview panel' };
|
||||
viewType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Id of the webview' };
|
||||
owner: 'mjbvz';
|
||||
comment: 'Triggered when a webview is created. Records the type of webview and the extension which created it';
|
||||
};
|
||||
|
||||
this._telemetryService.publicLog2<typeof payload, Classification>('webviews:createWebviewPanel', payload);
|
||||
}
|
||||
|
||||
public $disposeWebview(handle: extHostProtocol.WebviewHandle): void {
|
||||
|
||||
@@ -7,10 +7,8 @@ import * as dom from '../../../../base/browser/dom.js';
|
||||
import { StandardMouseEvent } from '../../../../base/browser/mouseEvent.js';
|
||||
import { getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
|
||||
import { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';
|
||||
import { Lazy } from '../../../../base/common/lazy.js';
|
||||
import { Disposable } from '../../../../base/common/lifecycle.js';
|
||||
import { URI } from '../../../../base/common/uri.js';
|
||||
import { generateUuid } from '../../../../base/common/uuid.js';
|
||||
import { ICodeEditorService } from '../../../../editor/browser/services/codeEditorService.js';
|
||||
import { IRange } from '../../../../editor/common/core/range.js';
|
||||
import { EditorContextKeys } from '../../../../editor/common/editorContextKeys.js';
|
||||
@@ -92,8 +90,6 @@ export class InlineAnchorWidget extends Disposable {
|
||||
const contextKeyService = this._register(originalContextKeyService.createScoped(element));
|
||||
this._chatResourceContext = chatAttachmentResourceContextKey.bindTo(contextKeyService);
|
||||
|
||||
const anchorId = new Lazy(generateUuid);
|
||||
|
||||
element.classList.add(InlineAnchorWidget.className, 'show-file-icons');
|
||||
|
||||
let iconText: string;
|
||||
@@ -109,18 +105,6 @@ export class InlineAnchorWidget extends Disposable {
|
||||
iconText = this.data.symbol.name;
|
||||
iconClasses = ['codicon', ...getIconClasses(modelService, languageService, undefined, undefined, SymbolKinds.toIcon(symbol.kind))];
|
||||
|
||||
this._register(dom.addDisposableListener(element, 'click', () => {
|
||||
telemetryService.publicLog2<{
|
||||
anchorId: string;
|
||||
}, {
|
||||
anchorId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Unique identifier for the current anchor.' };
|
||||
owner: 'mjbvz';
|
||||
comment: 'Provides insight into the usage of Chat features.';
|
||||
}>('chat.inlineAnchor.openSymbol', {
|
||||
anchorId: anchorId.value
|
||||
});
|
||||
}));
|
||||
|
||||
this._store.add(instantiationService.invokeFunction(accessor => hookUpSymbolAttachmentDragAndContextMenu(accessor, element, contextKeyService, { value: symbol.location, name: symbol.name, kind: symbol.kind }, MenuId.ChatInlineSymbolAnchorContext)));
|
||||
} else {
|
||||
location = this.data;
|
||||
@@ -156,18 +140,6 @@ export class InlineAnchorWidget extends Disposable {
|
||||
})
|
||||
.catch(() => { });
|
||||
|
||||
this._register(dom.addDisposableListener(element, 'click', () => {
|
||||
telemetryService.publicLog2<{
|
||||
anchorId: string;
|
||||
}, {
|
||||
anchorId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Unique identifier for the current anchor.' };
|
||||
owner: 'mjbvz';
|
||||
comment: 'Provides insight into the usage of Chat features.';
|
||||
}>('chat.inlineAnchor.openResource', {
|
||||
anchorId: anchorId.value
|
||||
});
|
||||
}));
|
||||
|
||||
// Context menu
|
||||
this._register(dom.addDisposableListener(element, dom.EventType.CONTEXT_MENU, async domEvent => {
|
||||
const event = new StandardMouseEvent(dom.getWindow(domEvent), domEvent);
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
|
||||
import { isFirefox } from '../../../../base/browser/browser.js';
|
||||
import { addDisposableListener, EventType, getWindowById } from '../../../../base/browser/dom.js';
|
||||
import { parentOriginHash } from '../../../../base/browser/iframe.js';
|
||||
import { IMouseWheelEvent } from '../../../../base/browser/mouseEvent.js';
|
||||
import { CodeWindow } from '../../../../base/browser/window.js';
|
||||
import { promiseWithResolvers, ThrottledDelayer } from '../../../../base/common/async.js';
|
||||
import { streamToBuffer, VSBufferReadableStream } from '../../../../base/common/buffer.js';
|
||||
import { CancellationTokenSource } from '../../../../base/common/cancellation.js';
|
||||
@@ -26,18 +28,15 @@ import { IInstantiationService } from '../../../../platform/instantiation/common
|
||||
import { ILogService } from '../../../../platform/log/common/log.js';
|
||||
import { INotificationService } from '../../../../platform/notification/common/notification.js';
|
||||
import { IRemoteAuthorityResolverService } from '../../../../platform/remote/common/remoteAuthorityResolver.js';
|
||||
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';
|
||||
import { ITunnelService } from '../../../../platform/tunnel/common/tunnel.js';
|
||||
import { WebviewPortMappingManager } from '../../../../platform/webview/common/webviewPortMapping.js';
|
||||
import { parentOriginHash } from '../../../../base/browser/iframe.js';
|
||||
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
|
||||
import { decodeAuthority, webviewGenericCspSource, webviewRootResourceAuthority } from '../common/webview.js';
|
||||
import { loadLocalResource, WebviewResourceResponse } from './resourceLoading.js';
|
||||
import { WebviewThemeDataProvider } from './themeing.js';
|
||||
import { areWebviewContentOptionsEqual, IWebview, WebviewContentOptions, WebviewExtensionDescription, WebviewInitInfo, WebviewMessageReceivedEvent, WebviewOptions } from './webview.js';
|
||||
import { WebviewFindDelegate, WebviewFindWidget } from './webviewFindWidget.js';
|
||||
import { FromWebviewMessage, KeyEvent, ToWebviewMessage, WebViewDragEvent } from './webviewMessages.js';
|
||||
import { decodeAuthority, webviewGenericCspSource, webviewRootResourceAuthority } from '../common/webview.js';
|
||||
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
|
||||
import { CodeWindow } from '../../../../base/browser/window.js';
|
||||
|
||||
interface WebviewContent {
|
||||
readonly html: string;
|
||||
@@ -158,7 +157,6 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
|
||||
@IFileService private readonly _fileService: IFileService,
|
||||
@ILogService private readonly _logService: ILogService,
|
||||
@IRemoteAuthorityResolverService private readonly _remoteAuthorityResolverService: IRemoteAuthorityResolverService,
|
||||
@ITelemetryService private readonly _telemetryService: ITelemetryService,
|
||||
@ITunnelService private readonly _tunnelService: ITunnelService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,
|
||||
@@ -588,18 +586,6 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
|
||||
if (this._environmentService.isExtensionDevelopment) {
|
||||
this._onMissingCsp.fire(this.extension.id);
|
||||
}
|
||||
|
||||
const payload = {
|
||||
extension: this.extension.id.value
|
||||
} as const;
|
||||
|
||||
type Classification = {
|
||||
extension: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The id of the extension that created the webview.' };
|
||||
owner: 'mjbvz';
|
||||
comment: 'Helps find which extensions are contributing webviews with invalid CSPs';
|
||||
};
|
||||
|
||||
this._telemetryService.publicLog2<typeof payload, Classification>('webviewMissingCsp', payload);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,14 +18,13 @@ import { ILogService } from '../../../../platform/log/common/log.js';
|
||||
import { INativeHostService } from '../../../../platform/native/common/native.js';
|
||||
import { INotificationService } from '../../../../platform/notification/common/notification.js';
|
||||
import { IRemoteAuthorityResolverService } from '../../../../platform/remote/common/remoteAuthorityResolver.js';
|
||||
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';
|
||||
import { ITunnelService } from '../../../../platform/tunnel/common/tunnel.js';
|
||||
import { FindInFrameOptions, IWebviewManagerService } from '../../../../platform/webview/common/webviewManagerService.js';
|
||||
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
|
||||
import { WebviewThemeDataProvider } from '../browser/themeing.js';
|
||||
import { WebviewInitInfo } from '../browser/webview.js';
|
||||
import { WebviewElement } from '../browser/webviewElement.js';
|
||||
import { WindowIgnoreMenuShortcutsManager } from './windowIgnoreMenuShortcutsManager.js';
|
||||
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
|
||||
|
||||
/**
|
||||
* Webview backed by an iframe but that uses Electron APIs to power the webview.
|
||||
@@ -48,7 +47,6 @@ export class ElectronWebviewElement extends WebviewElement {
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@ITunnelService tunnelService: ITunnelService,
|
||||
@IFileService fileService: IFileService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,
|
||||
@IRemoteAuthorityResolverService remoteAuthorityResolverService: IRemoteAuthorityResolverService,
|
||||
@ILogService logService: ILogService,
|
||||
@@ -61,7 +59,7 @@ export class ElectronWebviewElement extends WebviewElement {
|
||||
) {
|
||||
super(initInfo, webviewThemeDataProvider,
|
||||
configurationService, contextMenuService, notificationService, environmentService,
|
||||
fileService, logService, remoteAuthorityResolverService, telemetryService, tunnelService, instantiationService, accessibilityService);
|
||||
fileService, logService, remoteAuthorityResolverService, tunnelService, instantiationService, accessibilityService);
|
||||
|
||||
this._webviewKeyboardHandler = new WindowIgnoreMenuShortcutsManager(configurationService, mainProcessService, _nativeHostService);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user