mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 3d67364fbfcf676d93be64f949e9b33e7f1b969e (#5028)
This commit is contained in:
@@ -56,6 +56,16 @@ export abstract class AbstractRemoteAgentService extends Disposable implements I
|
||||
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
disableTelemetry(): Promise<void> {
|
||||
const connection = this.getConnection();
|
||||
if (connection) {
|
||||
const client = new RemoteExtensionEnvironmentChannelClient(connection.getChannel('remoteextensionsenvironment'));
|
||||
return client.disableTelemetry();
|
||||
}
|
||||
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
}
|
||||
|
||||
export class RemoteAgentConnection extends Disposable implements IRemoteAgentConnection {
|
||||
@@ -125,7 +135,7 @@ class RemoteConnectionFailureNotificationContribution implements IWorkbenchContr
|
||||
) {
|
||||
// Let's cover the case where connecting to fetch the remote extension info fails
|
||||
remoteAgentService.getEnvironment(true)
|
||||
.then(undefined, err => notificationService.error(nls.localize('connectionError', "Failed to connect to the remote extension host agent (Error: {0})", err ? err.message : '')));
|
||||
.then(undefined, err => notificationService.error(nls.localize('connectionError', "Failed to connect to the remote extension host server (Error: {0})", err ? err.message : '')));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ export interface IRemoteAgentEnvironmentDTO {
|
||||
userHome: UriComponents;
|
||||
extensions: IExtensionDescription[];
|
||||
os: platform.OperatingSystem;
|
||||
syncExtensions: boolean;
|
||||
}
|
||||
|
||||
export class RemoteExtensionEnvironmentChannelClient {
|
||||
@@ -54,8 +53,7 @@ export class RemoteExtensionEnvironmentChannelClient {
|
||||
globalStorageHome: URI.revive(data.globalStorageHome),
|
||||
userHome: URI.revive(data.userHome),
|
||||
extensions: data.extensions.map(ext => { (<any>ext).extensionLocation = URI.revive(ext.extensionLocation); return ext; }),
|
||||
os: data.os,
|
||||
syncExtensions: data.syncExtensions
|
||||
os: data.os
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -63,4 +61,8 @@ export class RemoteExtensionEnvironmentChannelClient {
|
||||
getDiagnosticInfo(options: IDiagnosticInfoOptions): Promise<IDiagnosticInfo> {
|
||||
return this.channel.call<IDiagnosticInfo>('getDiagnosticInfo', options);
|
||||
}
|
||||
|
||||
disableTelemetry(): Promise<void> {
|
||||
return this.channel.call<void>('disableTelemetry');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ export interface IRemoteAgentService {
|
||||
getConnection(): IRemoteAgentConnection | null;
|
||||
getEnvironment(bail?: boolean): Promise<IRemoteAgentEnvironment | null>;
|
||||
getDiagnosticInfo(options: IDiagnosticInfoOptions): Promise<IDiagnosticInfo | undefined>;
|
||||
disableTelemetry(): Promise<void>;
|
||||
}
|
||||
|
||||
export interface IRemoteAgentConnection {
|
||||
|
||||
Reference in New Issue
Block a user