@codingame/monaco-vscode-remote-agent-service-override 3.2.3 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/remoteAgent.js +9 -9
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
- package/override/vs/platform/dialogs/common/dialogs.js +0 -8
- package/vscode/src/vs/platform/download/common/downloadIpc.js +0 -18
- package/vscode/src/vs/platform/log/common/logIpc.js +0 -26
- package/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.js +0 -110
- package/vscode/src/vs/workbench/contrib/remote/browser/explorerViewItems.js +0 -135
- package/vscode/src/vs/workbench/contrib/remote/browser/media/remoteViewlet.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/remote/browser/remote.contribution.js +0 -19
- package/vscode/src/vs/workbench/contrib/remote/browser/remote.js +0 -831
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteConnectionHealth.js +0 -158
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIndicator.js +0 -774
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteStartEntry.contribution.js +0 -6
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteStartEntry.js +0 -97
- package/vscode/src/vs/workbench/contrib/remote/browser/showCandidate.js +0 -35
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelFactory.js +0 -110
- package/vscode/src/vs/workbench/contrib/remote/common/remote.contribution.js +0 -515
- package/vscode/src/vs/workbench/services/remote/browser/browserRemoteResourceHandler.js +0 -49
- package/vscode/src/vs/workbench/services/remote/browser/remoteAgentService.js +0 -78
- package/vscode/src/vs/workbench/services/remote/common/abstractRemoteAgentService.js +0 -179
- package/vscode/src/vs/workbench/services/remote/common/remoteAgentEnvironmentChannel.js +0 -54
- package/vscode/src/vs/workbench/services/remote/common/remoteExtensionsScanner.js +0 -73
- package/vscode/src/vs/workbench/services/tunnel/browser/tunnelService.js +0 -36
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { remoteConnectionLatencyMeasurer, IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService';
|
|
3
|
-
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
|
|
4
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
5
|
-
import { isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
6
|
-
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
7
|
-
import { getRemoteName } from 'vscode/vscode/vs/platform/remote/common/remoteHosts';
|
|
8
|
-
import { IBannerService } from 'vscode/vscode/vs/workbench/services/banner/browser/bannerService';
|
|
9
|
-
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener';
|
|
10
|
-
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host';
|
|
11
|
-
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
12
|
-
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService';
|
|
13
|
-
import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
14
|
-
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
15
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
16
|
-
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
|
|
17
|
-
|
|
18
|
-
const REMOTE_UNSUPPORTED_CONNECTION_CHOICE_KEY = 'remote.unsupportedConnectionChoice';
|
|
19
|
-
let InitialRemoteConnectionHealthContribution = class InitialRemoteConnectionHealthContribution {
|
|
20
|
-
constructor(_remoteAgentService, _environmentService, _telemetryService, bannerService, dialogService, openerService, hostService, storageService, productService) {
|
|
21
|
-
this._remoteAgentService = _remoteAgentService;
|
|
22
|
-
this._environmentService = _environmentService;
|
|
23
|
-
this._telemetryService = _telemetryService;
|
|
24
|
-
this.bannerService = bannerService;
|
|
25
|
-
this.dialogService = dialogService;
|
|
26
|
-
this.openerService = openerService;
|
|
27
|
-
this.hostService = hostService;
|
|
28
|
-
this.storageService = storageService;
|
|
29
|
-
this.productService = productService;
|
|
30
|
-
if (this._environmentService.remoteAuthority) {
|
|
31
|
-
this._checkInitialRemoteConnectionHealth();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
async _confirmConnection() {
|
|
35
|
-
const { result, checkboxChecked } = await this.dialogService.prompt({
|
|
36
|
-
type: Severity.Warning,
|
|
37
|
-
message: ( localizeWithPath(
|
|
38
|
-
'vs/workbench/contrib/remote/browser/remoteConnectionHealth',
|
|
39
|
-
'unsupportedGlibcWarning',
|
|
40
|
-
"You are about to connect to an OS version that is unsupported by {0}.",
|
|
41
|
-
this.productService.nameLong
|
|
42
|
-
)),
|
|
43
|
-
buttons: [
|
|
44
|
-
{
|
|
45
|
-
label: ( localizeWithPath(
|
|
46
|
-
'vs/workbench/contrib/remote/browser/remoteConnectionHealth',
|
|
47
|
-
{ key: 'allow', comment: ['&& denotes a mnemonic'] },
|
|
48
|
-
"&&Allow"
|
|
49
|
-
)),
|
|
50
|
-
run: () => 1
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
label: ( localizeWithPath(
|
|
54
|
-
'vs/workbench/contrib/remote/browser/remoteConnectionHealth',
|
|
55
|
-
{ key: 'learnMore', comment: ['&& denotes a mnemonic'] },
|
|
56
|
-
"&&Learn More"
|
|
57
|
-
)),
|
|
58
|
-
run: async () => { await this.openerService.open('https://aka.ms/vscode-remote/faq/old-linux'); return 2 ; }
|
|
59
|
-
}
|
|
60
|
-
],
|
|
61
|
-
cancelButton: {
|
|
62
|
-
run: () => 0
|
|
63
|
-
},
|
|
64
|
-
checkbox: {
|
|
65
|
-
label: ( localizeWithPath(
|
|
66
|
-
'vs/workbench/contrib/remote/browser/remoteConnectionHealth',
|
|
67
|
-
'remember',
|
|
68
|
-
"Do not show again"
|
|
69
|
-
)),
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
if (result === 2 ) {
|
|
73
|
-
return await this._confirmConnection();
|
|
74
|
-
}
|
|
75
|
-
const allowed = result === 1 ;
|
|
76
|
-
if (allowed && checkboxChecked) {
|
|
77
|
-
this.storageService.store(`${REMOTE_UNSUPPORTED_CONNECTION_CHOICE_KEY}.${this._environmentService.remoteAuthority}`, allowed, 0 , 1 );
|
|
78
|
-
}
|
|
79
|
-
return allowed;
|
|
80
|
-
}
|
|
81
|
-
async _checkInitialRemoteConnectionHealth() {
|
|
82
|
-
try {
|
|
83
|
-
const environment = await this._remoteAgentService.getRawEnvironment();
|
|
84
|
-
if (environment && environment.isUnsupportedGlibc) {
|
|
85
|
-
let allowed = this.storageService.getBoolean(`${REMOTE_UNSUPPORTED_CONNECTION_CHOICE_KEY}.${this._environmentService.remoteAuthority}`, 0 );
|
|
86
|
-
if (allowed === undefined) {
|
|
87
|
-
allowed = await this._confirmConnection();
|
|
88
|
-
}
|
|
89
|
-
if (allowed) {
|
|
90
|
-
const actions = [
|
|
91
|
-
{
|
|
92
|
-
label: ( localizeWithPath(
|
|
93
|
-
'vs/workbench/contrib/remote/browser/remoteConnectionHealth',
|
|
94
|
-
'unsupportedGlibcBannerLearnMore',
|
|
95
|
-
"Learn More"
|
|
96
|
-
)),
|
|
97
|
-
href: 'https://aka.ms/vscode-remote/faq/old-linux'
|
|
98
|
-
}
|
|
99
|
-
];
|
|
100
|
-
this.bannerService.show({
|
|
101
|
-
id: 'unsupportedGlibcWarning.banner',
|
|
102
|
-
message: ( localizeWithPath(
|
|
103
|
-
'vs/workbench/contrib/remote/browser/remoteConnectionHealth',
|
|
104
|
-
'unsupportedGlibcWarning.banner',
|
|
105
|
-
"You are connected to an OS version that is unsupported by {0}.",
|
|
106
|
-
this.productService.nameLong
|
|
107
|
-
)),
|
|
108
|
-
actions,
|
|
109
|
-
icon: Codicon.warning,
|
|
110
|
-
disableCloseAction: true
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
this.hostService.openWindow({ forceReuseWindow: true, remoteAuthority: null });
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
this._telemetryService.publicLog2('remoteConnectionSuccess', {
|
|
119
|
-
web: isWeb,
|
|
120
|
-
connectionTimeMs: await this._remoteAgentService.getConnection()?.getInitialConnectionTimeMs(),
|
|
121
|
-
remoteName: getRemoteName(this._environmentService.remoteAuthority)
|
|
122
|
-
});
|
|
123
|
-
await this._measureExtHostLatency();
|
|
124
|
-
}
|
|
125
|
-
catch (err) {
|
|
126
|
-
this._telemetryService.publicLog2('remoteConnectionFailure', {
|
|
127
|
-
web: isWeb,
|
|
128
|
-
connectionTimeMs: await this._remoteAgentService.getConnection()?.getInitialConnectionTimeMs(),
|
|
129
|
-
remoteName: getRemoteName(this._environmentService.remoteAuthority),
|
|
130
|
-
message: err ? err.message : ''
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
async _measureExtHostLatency() {
|
|
135
|
-
const measurement = await remoteConnectionLatencyMeasurer.measure(this._remoteAgentService);
|
|
136
|
-
if (measurement === undefined) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
this._telemetryService.publicLog2('remoteConnectionLatency', {
|
|
140
|
-
web: isWeb,
|
|
141
|
-
remoteName: getRemoteName(this._environmentService.remoteAuthority),
|
|
142
|
-
latencyMs: measurement.current
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
InitialRemoteConnectionHealthContribution = ( __decorate([
|
|
147
|
-
( __param(0, IRemoteAgentService)),
|
|
148
|
-
( __param(1, IWorkbenchEnvironmentService)),
|
|
149
|
-
( __param(2, ITelemetryService)),
|
|
150
|
-
( __param(3, IBannerService)),
|
|
151
|
-
( __param(4, IDialogService)),
|
|
152
|
-
( __param(5, IOpenerService)),
|
|
153
|
-
( __param(6, IHostService)),
|
|
154
|
-
( __param(7, IStorageService)),
|
|
155
|
-
( __param(8, IProductService))
|
|
156
|
-
], InitialRemoteConnectionHealthContribution));
|
|
157
|
-
|
|
158
|
-
export { InitialRemoteConnectionHealthContribution };
|