@codingame/monaco-vscode-remote-agent-service-override 5.2.0 → 6.0.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 +6 -4
- package/vscode/src/vs/platform/files/common/diskFileSystemProviderClient.js +12 -12
- package/vscode/src/vs/platform/remote/browser/browserSocketFactory.js +10 -10
- package/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.js +2 -2
- package/vscode/src/vs/workbench/contrib/remote/browser/explorerViewItems.js +2 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/remote.contribution.js +11 -10
- package/vscode/src/vs/workbench/contrib/remote/browser/remote.js +14 -12
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteConnectionHealth.js +16 -9
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIndicator.js +14 -9
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteStartEntry.contribution.js +2 -1
- package/vscode/src/vs/workbench/contrib/remote/common/remote.contribution.js +9 -8
- package/vscode/src/vs/workbench/services/remote/browser/browserRemoteResourceHandler.js +2 -2
- package/vscode/src/vs/workbench/services/remote/browser/remoteAgentService.js +2 -2
- package/vscode/src/vs/workbench/services/remote/common/remoteExtensionsScanner.js +15 -5
- package/vscode/src/vs/workbench/services/remote/common/remoteFileSystemProviderClient.js +2 -1
- package/vscode/src/vs/workbench/services/tunnel/browser/tunnelService.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-remote-agent-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
30
|
-
"@codingame/monaco-vscode-environment-service-override": "
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@6.0.0",
|
|
30
|
+
"@codingame/monaco-vscode-environment-service-override": "6.0.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/remoteAgent.js
CHANGED
|
@@ -26,6 +26,7 @@ import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/use
|
|
|
26
26
|
import { IActiveLanguagePackService } from 'vscode/vscode/vs/workbench/services/localization/common/locale.service';
|
|
27
27
|
import { ITunnelService } from 'vscode/vscode/vs/platform/tunnel/common/tunnel.service';
|
|
28
28
|
import { TunnelService } from './vscode/src/vs/workbench/services/tunnel/browser/tunnelService.js';
|
|
29
|
+
import { IWorkbenchExtensionManagementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
29
30
|
import getServiceOverride$1 from '@codingame/monaco-vscode-environment-service-override';
|
|
30
31
|
import { getWorkbenchConstructionOptions } from 'vscode/workbench';
|
|
31
32
|
import { registerServiceInitializePreParticipant } from 'vscode/lifecycle';
|
|
@@ -58,8 +59,8 @@ InjectedRemoteAuthorityResolverService = __decorate([
|
|
|
58
59
|
( __param(3, IFileService))
|
|
59
60
|
], InjectedRemoteAuthorityResolverService);
|
|
60
61
|
let CustomRemoteExtensionsScannerService = class CustomRemoteExtensionsScannerService extends RemoteExtensionsScannerService {
|
|
61
|
-
constructor(scanRemoteExtensions, remoteAgentService, environmentService, userDataProfileService, remoteUserDataProfilesService,
|
|
62
|
-
super(remoteAgentService, environmentService, userDataProfileService, remoteUserDataProfilesService,
|
|
62
|
+
constructor(scanRemoteExtensions, remoteAgentService, environmentService, userDataProfileService, remoteUserDataProfilesService, activeLanguagePackService, extensionManagementService, logService) {
|
|
63
|
+
super(remoteAgentService, environmentService, userDataProfileService, remoteUserDataProfilesService, activeLanguagePackService, extensionManagementService, logService);
|
|
63
64
|
this.scanRemoteExtensions = scanRemoteExtensions;
|
|
64
65
|
}
|
|
65
66
|
async scanExtensions() {
|
|
@@ -74,8 +75,9 @@ CustomRemoteExtensionsScannerService = __decorate([
|
|
|
74
75
|
( __param(2, IWorkbenchEnvironmentService)),
|
|
75
76
|
( __param(3, IUserDataProfileService)),
|
|
76
77
|
( __param(4, IRemoteUserDataProfilesService)),
|
|
77
|
-
( __param(5,
|
|
78
|
-
( __param(6,
|
|
78
|
+
( __param(5, IActiveLanguagePackService)),
|
|
79
|
+
( __param(6, IWorkbenchExtensionManagementService)),
|
|
80
|
+
( __param(7, ILogService))
|
|
79
81
|
], CustomRemoteExtensionsScannerService);
|
|
80
82
|
registerServiceInitializePreParticipant(async (serviceAccessor) => {
|
|
81
83
|
RemoteFileSystemProviderClient.register(serviceAccessor.get(IRemoteAgentService), serviceAccessor.get(IFileService), serviceAccessor.get(ILogService));
|
|
@@ -5,7 +5,7 @@ import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
|
5
5
|
import { Disposable, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { newWriteableStream } from 'vscode/vscode/vs/base/common/stream';
|
|
7
7
|
import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
|
|
8
|
-
import { createFileSystemProviderError, FileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
8
|
+
import { FileSystemProviderCapabilities, createFileSystemProviderError, FileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
9
9
|
import { reviveFileChanges } from 'vscode/vscode/vs/platform/files/common/watcher';
|
|
10
10
|
|
|
11
11
|
class DiskFileSystemProviderClient extends Disposable {
|
|
@@ -24,20 +24,20 @@ class DiskFileSystemProviderClient extends Disposable {
|
|
|
24
24
|
get capabilities() {
|
|
25
25
|
if (!this._capabilities) {
|
|
26
26
|
this._capabilities =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
FileSystemProviderCapabilities.FileReadWrite |
|
|
28
|
+
FileSystemProviderCapabilities.FileOpenReadWriteClose |
|
|
29
|
+
FileSystemProviderCapabilities.FileReadStream |
|
|
30
|
+
FileSystemProviderCapabilities.FileFolderCopy |
|
|
31
|
+
FileSystemProviderCapabilities.FileWriteUnlock |
|
|
32
|
+
FileSystemProviderCapabilities.FileAtomicRead |
|
|
33
|
+
FileSystemProviderCapabilities.FileAtomicWrite |
|
|
34
|
+
FileSystemProviderCapabilities.FileAtomicDelete |
|
|
35
|
+
FileSystemProviderCapabilities.FileClone;
|
|
36
36
|
if (this.extraCapabilities.pathCaseSensitive) {
|
|
37
|
-
this._capabilities |=
|
|
37
|
+
this._capabilities |= FileSystemProviderCapabilities.PathCaseSensitive;
|
|
38
38
|
}
|
|
39
39
|
if (this.extraCapabilities.trash) {
|
|
40
|
-
this._capabilities |=
|
|
40
|
+
this._capabilities |= FileSystemProviderCapabilities.Trash;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
return this._capabilities;
|
|
@@ -3,7 +3,7 @@ import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
|
3
3
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
4
4
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
5
5
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
|
-
import { SocketDiagnostics } from 'vscode/vscode/vs/base/parts/ipc/common/ipc.net';
|
|
6
|
+
import { SocketDiagnostics, SocketDiagnosticsEventType, SocketCloseEventType } from 'vscode/vscode/vs/base/parts/ipc/common/ipc.net';
|
|
7
7
|
import { RemoteAuthorityResolverError, RemoteAuthorityResolverErrorCode } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
8
8
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
9
9
|
|
|
@@ -23,7 +23,7 @@ class BrowserWebSocket extends Disposable {
|
|
|
23
23
|
this.onError = this._onError.event;
|
|
24
24
|
this._debugLabel = debugLabel;
|
|
25
25
|
this._socket = ( new WebSocket(url));
|
|
26
|
-
this.traceSocketEvent(
|
|
26
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Created, { type: 'BrowserWebSocket', url });
|
|
27
27
|
this._fileReader = ( new FileReader());
|
|
28
28
|
this._queue = [];
|
|
29
29
|
this._isReading = false;
|
|
@@ -31,7 +31,7 @@ class BrowserWebSocket extends Disposable {
|
|
|
31
31
|
this._fileReader.onload = (event) => {
|
|
32
32
|
this._isReading = false;
|
|
33
33
|
const buff = event.target.result;
|
|
34
|
-
this.traceSocketEvent(
|
|
34
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Read, buff);
|
|
35
35
|
this._onData.fire(buff);
|
|
36
36
|
if (this._queue.length > 0) {
|
|
37
37
|
enqueue(this._queue.shift());
|
|
@@ -47,12 +47,12 @@ class BrowserWebSocket extends Disposable {
|
|
|
47
47
|
};
|
|
48
48
|
this._socketMessageListener = (ev) => {
|
|
49
49
|
const blob = ev.data;
|
|
50
|
-
this.traceSocketEvent(
|
|
50
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.BrowserWebSocketBlobReceived, { type: blob.type, size: blob.size });
|
|
51
51
|
enqueue(blob);
|
|
52
52
|
};
|
|
53
53
|
this._socket.addEventListener('message', this._socketMessageListener);
|
|
54
54
|
this._register(addDisposableListener(this._socket, 'open', (e) => {
|
|
55
|
-
this.traceSocketEvent(
|
|
55
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Open);
|
|
56
56
|
this._onOpen.fire();
|
|
57
57
|
}));
|
|
58
58
|
let pendingErrorEvent = null;
|
|
@@ -73,7 +73,7 @@ class BrowserWebSocket extends Disposable {
|
|
|
73
73
|
sendPendingErrorNow();
|
|
74
74
|
};
|
|
75
75
|
this._register(addDisposableListener(this._socket, 'close', (e) => {
|
|
76
|
-
this.traceSocketEvent(
|
|
76
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Close, { code: e.code, reason: e.reason, wasClean: e.wasClean });
|
|
77
77
|
this._isClosed = true;
|
|
78
78
|
if (pendingErrorEvent) {
|
|
79
79
|
if (!navigator.onLine) {
|
|
@@ -100,7 +100,7 @@ class BrowserWebSocket extends Disposable {
|
|
|
100
100
|
this._onClose.fire({ code: e.code, reason: e.reason, wasClean: e.wasClean, event: e });
|
|
101
101
|
}));
|
|
102
102
|
this._register(addDisposableListener(this._socket, 'error', (err) => {
|
|
103
|
-
this.traceSocketEvent(
|
|
103
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Error, { message: err?.message });
|
|
104
104
|
sendErrorSoon(err);
|
|
105
105
|
}));
|
|
106
106
|
}
|
|
@@ -108,12 +108,12 @@ class BrowserWebSocket extends Disposable {
|
|
|
108
108
|
if (this._isClosed) {
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
this.traceSocketEvent(
|
|
111
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Write, data);
|
|
112
112
|
this._socket.send(data);
|
|
113
113
|
}
|
|
114
114
|
close() {
|
|
115
115
|
this._isClosed = true;
|
|
116
|
-
this.traceSocketEvent(
|
|
116
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Close);
|
|
117
117
|
this._socket.close();
|
|
118
118
|
this._socket.removeEventListener('message', this._socketMessageListener);
|
|
119
119
|
this.dispose();
|
|
@@ -150,7 +150,7 @@ class BrowserSocket {
|
|
|
150
150
|
}
|
|
151
151
|
else {
|
|
152
152
|
listener({
|
|
153
|
-
type:
|
|
153
|
+
type: SocketCloseEventType.WebSocketCloseEvent,
|
|
154
154
|
code: e.code,
|
|
155
155
|
reason: e.reason,
|
|
156
156
|
wasClean: e.wasClean,
|
|
@@ -9,7 +9,7 @@ import { mark } from 'vscode/vscode/vs/base/common/performance';
|
|
|
9
9
|
import { StopWatch } from 'vscode/vscode/vs/base/common/stopwatch';
|
|
10
10
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
11
11
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
12
|
-
import { getRemoteAuthorityPrefix, WebSocketRemoteConnection } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
12
|
+
import { getRemoteAuthorityPrefix, WebSocketRemoteConnection, RemoteConnectionType } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
13
13
|
import { parseAuthorityWithOptionalPort } from 'vscode/vscode/vs/platform/remote/common/remoteHosts';
|
|
14
14
|
|
|
15
15
|
let RemoteAuthorityResolverService = class RemoteAuthorityResolverService extends Disposable {
|
|
@@ -78,7 +78,7 @@ let RemoteAuthorityResolverService = class RemoteAuthorityResolverService extend
|
|
|
78
78
|
_setResolvedAuthority(resolvedAuthority, options) {
|
|
79
79
|
if (( this._resolveAuthorityRequests.has(resolvedAuthority.authority))) {
|
|
80
80
|
const request = this._resolveAuthorityRequests.get(resolvedAuthority.authority);
|
|
81
|
-
if (resolvedAuthority.connectTo.type ===
|
|
81
|
+
if (resolvedAuthority.connectTo.type === RemoteConnectionType.WebSocket) {
|
|
82
82
|
RemoteAuthorities.set(resolvedAuthority.authority, resolvedAuthority.connectTo.host, resolvedAuthority.connectTo.port);
|
|
83
83
|
}
|
|
84
84
|
if (resolvedAuthority.connectionToken) {
|
|
@@ -4,6 +4,7 @@ import { REMOTE_EXPLORER_TYPE_KEY } from 'vscode/vscode/vs/workbench/services/re
|
|
|
4
4
|
import { IRemoteExplorerService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteExplorerService.service';
|
|
5
5
|
import { isStringArray } from 'vscode/vscode/vs/base/common/types';
|
|
6
6
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
7
|
+
import { StorageScope } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
7
8
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
8
9
|
import { RawContextKey, ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
9
10
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
@@ -50,7 +51,7 @@ let SwitchRemoteViewItem = class SwitchRemoteViewItem extends Disposable {
|
|
|
50
51
|
isSetForConnection = true;
|
|
51
52
|
const explorerType = remoteAuthority ? [remoteAuthority.split('+')[0]]
|
|
52
53
|
: (virtualWorkspace ? [virtualWorkspace]
|
|
53
|
-
: (this.storageService.get(REMOTE_EXPLORER_TYPE_KEY,
|
|
54
|
+
: (this.storageService.get(REMOTE_EXPLORER_TYPE_KEY, StorageScope.WORKSPACE)?.split(',') ?? this.storageService.get(REMOTE_EXPLORER_TYPE_KEY, StorageScope.PROFILE)?.split(',')));
|
|
54
55
|
if (explorerType !== undefined) {
|
|
55
56
|
authority = this.getAuthorityForExplorerType(explorerType);
|
|
56
57
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Extensions, registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
1
|
+
import { Extensions, registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
2
2
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
3
3
|
import { ShowCandidateContribution } from './showCandidate.js';
|
|
4
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
4
5
|
import { TunnelFactoryContribution } from './tunnelFactory.js';
|
|
5
6
|
import { RemoteAgentConnectionStatusListener, RemoteMarkers } from './remote.js';
|
|
6
7
|
import { RemoteStatusIndicator } from './remoteIndicator.js';
|
|
@@ -8,12 +9,12 @@ import { ForwardedPortsView, PortRestore, AutomaticPortForwarding } from 'vscode
|
|
|
8
9
|
import { InitialRemoteConnectionHealthContribution } from './remoteConnectionHealth.js';
|
|
9
10
|
|
|
10
11
|
const workbenchContributionsRegistry = ( Registry.as(Extensions.Workbench));
|
|
11
|
-
registerWorkbenchContribution2(ShowCandidateContribution.ID, ShowCandidateContribution,
|
|
12
|
-
registerWorkbenchContribution2(TunnelFactoryContribution.ID, TunnelFactoryContribution,
|
|
13
|
-
workbenchContributionsRegistry.registerWorkbenchContribution(RemoteAgentConnectionStatusListener,
|
|
14
|
-
registerWorkbenchContribution2(RemoteStatusIndicator.ID, RemoteStatusIndicator,
|
|
15
|
-
workbenchContributionsRegistry.registerWorkbenchContribution(ForwardedPortsView,
|
|
16
|
-
workbenchContributionsRegistry.registerWorkbenchContribution(PortRestore,
|
|
17
|
-
workbenchContributionsRegistry.registerWorkbenchContribution(AutomaticPortForwarding,
|
|
18
|
-
workbenchContributionsRegistry.registerWorkbenchContribution(RemoteMarkers,
|
|
19
|
-
workbenchContributionsRegistry.registerWorkbenchContribution(InitialRemoteConnectionHealthContribution,
|
|
12
|
+
registerWorkbenchContribution2(ShowCandidateContribution.ID, ShowCandidateContribution, WorkbenchPhase.BlockRestore);
|
|
13
|
+
registerWorkbenchContribution2(TunnelFactoryContribution.ID, TunnelFactoryContribution, WorkbenchPhase.BlockRestore);
|
|
14
|
+
workbenchContributionsRegistry.registerWorkbenchContribution(RemoteAgentConnectionStatusListener, LifecyclePhase.Eventually);
|
|
15
|
+
registerWorkbenchContribution2(RemoteStatusIndicator.ID, RemoteStatusIndicator, WorkbenchPhase.BlockStartup);
|
|
16
|
+
workbenchContributionsRegistry.registerWorkbenchContribution(ForwardedPortsView, LifecyclePhase.Restored);
|
|
17
|
+
workbenchContributionsRegistry.registerWorkbenchContribution(PortRestore, LifecyclePhase.Eventually);
|
|
18
|
+
workbenchContributionsRegistry.registerWorkbenchContribution(AutomaticPortForwarding, LifecyclePhase.Eventually);
|
|
19
|
+
workbenchContributionsRegistry.registerWorkbenchContribution(RemoteMarkers, LifecyclePhase.Eventually);
|
|
20
|
+
workbenchContributionsRegistry.registerWorkbenchContribution(InitialRemoteConnectionHealthContribution, LifecyclePhase.Restored);
|
|
@@ -17,15 +17,17 @@ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extension
|
|
|
17
17
|
import { FilterViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewsViewlet';
|
|
18
18
|
import { VIEWLET_ID } from 'vscode/vscode/vs/workbench/contrib/remote/browser/remoteExplorer';
|
|
19
19
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
20
|
-
import { Extensions } from 'vscode/vscode/vs/workbench/common/views';
|
|
20
|
+
import { Extensions, ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
21
21
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
22
22
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
23
23
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
24
24
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
25
25
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
26
|
+
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
26
27
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
27
28
|
import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
28
29
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
30
|
+
import { PersistentConnectionEventType } from 'vscode/vscode/vs/platform/remote/common/remoteAgentConnection';
|
|
29
31
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
30
32
|
import { ReloadWindowAction } from 'vscode/vscode/vs/workbench/browser/actions/windowActions';
|
|
31
33
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
@@ -512,7 +514,7 @@ RemoteViewPaneContainer = ( (__decorate([
|
|
|
512
514
|
},
|
|
513
515
|
icon: remoteExplorerViewIcon,
|
|
514
516
|
order: 4
|
|
515
|
-
},
|
|
517
|
+
}, ViewContainerLocation.Sidebar);
|
|
516
518
|
let RemoteMarkers = class RemoteMarkers {
|
|
517
519
|
constructor(remoteAgentService, timerService) {
|
|
518
520
|
remoteAgentService.getEnvironment().then(remoteEnv => {
|
|
@@ -619,7 +621,7 @@ let RemoteAgentConnectionStatusListener = class RemoteAgentConnectionStatusListe
|
|
|
619
621
|
visibleProgress = null;
|
|
620
622
|
}
|
|
621
623
|
if (!location) {
|
|
622
|
-
location = quickInputVisible ?
|
|
624
|
+
location = quickInputVisible ? ProgressLocation.Notification : ProgressLocation.Dialog;
|
|
623
625
|
}
|
|
624
626
|
return (
|
|
625
627
|
(new VisibleProgress(
|
|
@@ -632,8 +634,8 @@ let RemoteAgentConnectionStatusListener = class RemoteAgentConnectionStatusListe
|
|
|
632
634
|
buttons[choice].callback();
|
|
633
635
|
}
|
|
634
636
|
else {
|
|
635
|
-
if (location ===
|
|
636
|
-
visibleProgress = showProgress(
|
|
637
|
+
if (location === ProgressLocation.Dialog) {
|
|
638
|
+
visibleProgress = showProgress(ProgressLocation.Notification, buttons, lastReport);
|
|
637
639
|
}
|
|
638
640
|
else {
|
|
639
641
|
hideProgress();
|
|
@@ -677,7 +679,7 @@ let RemoteAgentConnectionStatusListener = class RemoteAgentConnectionStatusListe
|
|
|
677
679
|
disposableListener = null;
|
|
678
680
|
}
|
|
679
681
|
switch (e.type) {
|
|
680
|
-
case
|
|
682
|
+
case PersistentConnectionEventType.ConnectionLost:
|
|
681
683
|
reconnectionToken = e.reconnectionToken;
|
|
682
684
|
lastIncomingDataTime = Date.now() - e.millisSinceLastIncomingData;
|
|
683
685
|
reconnectionAttempts = 0;
|
|
@@ -692,14 +694,14 @@ let RemoteAgentConnectionStatusListener = class RemoteAgentConnectionStatusListe
|
|
|
692
694
|
visibleProgress.report(( localizeWithPath(_moduleId, 12, "Connection Lost")));
|
|
693
695
|
}
|
|
694
696
|
break;
|
|
695
|
-
case
|
|
697
|
+
case PersistentConnectionEventType.ReconnectionWait:
|
|
696
698
|
if (visibleProgress) {
|
|
697
699
|
reconnectWaitEvent = e;
|
|
698
700
|
visibleProgress = showProgress(null, [reconnectButton, reloadButton]);
|
|
699
701
|
visibleProgress.startTimer(Date.now() + 1000 * e.durationSeconds);
|
|
700
702
|
}
|
|
701
703
|
break;
|
|
702
|
-
case
|
|
704
|
+
case PersistentConnectionEventType.ReconnectionRunning:
|
|
703
705
|
reconnectionToken = e.reconnectionToken;
|
|
704
706
|
lastIncomingDataTime = Date.now() - e.millisSinceLastIncomingData;
|
|
705
707
|
reconnectionAttempts = e.attempt;
|
|
@@ -713,13 +715,13 @@ let RemoteAgentConnectionStatusListener = class RemoteAgentConnectionStatusListe
|
|
|
713
715
|
visibleProgress = showProgress(null, [reloadButton]);
|
|
714
716
|
visibleProgress.report(( localizeWithPath(_moduleId, 13, "Disconnected. Attempting to reconnect...")));
|
|
715
717
|
disposableListener = quickInputService.onShow(() => {
|
|
716
|
-
if (visibleProgress && visibleProgress.location ===
|
|
717
|
-
visibleProgress = showProgress(
|
|
718
|
+
if (visibleProgress && visibleProgress.location === ProgressLocation.Dialog) {
|
|
719
|
+
visibleProgress = showProgress(ProgressLocation.Notification, [reloadButton], visibleProgress.lastReport);
|
|
718
720
|
}
|
|
719
721
|
});
|
|
720
722
|
}
|
|
721
723
|
break;
|
|
722
|
-
case
|
|
724
|
+
case PersistentConnectionEventType.ReconnectionPermanentFailure:
|
|
723
725
|
reconnectionToken = e.reconnectionToken;
|
|
724
726
|
lastIncomingDataTime = Date.now() - e.millisSinceLastIncomingData;
|
|
725
727
|
reconnectionAttempts = e.attempt;
|
|
@@ -748,7 +750,7 @@ let RemoteAgentConnectionStatusListener = class RemoteAgentConnectionStatusListe
|
|
|
748
750
|
});
|
|
749
751
|
}
|
|
750
752
|
break;
|
|
751
|
-
case
|
|
753
|
+
case PersistentConnectionEventType.ConnectionGain:
|
|
752
754
|
reconnectionToken = e.reconnectionToken;
|
|
753
755
|
lastIncomingDataTime = Date.now() - e.millisSinceLastIncomingData;
|
|
754
756
|
reconnectionAttempts = e.attempt;
|
|
@@ -9,6 +9,7 @@ import { getRemoteName } from 'vscode/vscode/vs/platform/remote/common/remoteHos
|
|
|
9
9
|
import { IBannerService } from 'vscode/vscode/vs/workbench/services/banner/browser/bannerService.service';
|
|
10
10
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
11
11
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
12
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
12
13
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
13
14
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
14
15
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
@@ -34,6 +35,12 @@ let InitialRemoteConnectionHealthContribution = class InitialRemoteConnectionHea
|
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
async _confirmConnection() {
|
|
38
|
+
let ConnectionChoice;
|
|
39
|
+
( ((function(ConnectionChoice) {
|
|
40
|
+
ConnectionChoice[ConnectionChoice["Allow"] = 1] = "Allow";
|
|
41
|
+
ConnectionChoice[ConnectionChoice["LearnMore"] = 2] = "LearnMore";
|
|
42
|
+
ConnectionChoice[ConnectionChoice["Cancel"] = 0] = "Cancel";
|
|
43
|
+
})(ConnectionChoice || (ConnectionChoice = {}))));
|
|
37
44
|
const { result, checkboxChecked } = await this.dialogService.prompt({
|
|
38
45
|
type: Severity$1.Warning,
|
|
39
46
|
message: ( localizeWithPath(
|
|
@@ -45,26 +52,26 @@ let InitialRemoteConnectionHealthContribution = class InitialRemoteConnectionHea
|
|
|
45
52
|
buttons: [
|
|
46
53
|
{
|
|
47
54
|
label: ( localizeWithPath(_moduleId, 1, "&&Allow")),
|
|
48
|
-
run: () =>
|
|
55
|
+
run: () => ConnectionChoice.Allow
|
|
49
56
|
},
|
|
50
57
|
{
|
|
51
58
|
label: ( localizeWithPath(_moduleId, 2, "&&Learn More")),
|
|
52
|
-
run: async () => { await this.openerService.open('https://aka.ms/vscode-remote/faq/old-linux'); return
|
|
59
|
+
run: async () => { await this.openerService.open('https://aka.ms/vscode-remote/faq/old-linux'); return ConnectionChoice.LearnMore; }
|
|
53
60
|
}
|
|
54
61
|
],
|
|
55
62
|
cancelButton: {
|
|
56
|
-
run: () =>
|
|
63
|
+
run: () => ConnectionChoice.Cancel
|
|
57
64
|
},
|
|
58
65
|
checkbox: {
|
|
59
66
|
label: ( localizeWithPath(_moduleId, 3, "Do not show again")),
|
|
60
67
|
}
|
|
61
68
|
});
|
|
62
|
-
if (result ===
|
|
69
|
+
if (result === ConnectionChoice.LearnMore) {
|
|
63
70
|
return await this._confirmConnection();
|
|
64
71
|
}
|
|
65
|
-
const allowed = result ===
|
|
72
|
+
const allowed = result === ConnectionChoice.Allow;
|
|
66
73
|
if (allowed && checkboxChecked) {
|
|
67
|
-
this.storageService.store(`${REMOTE_UNSUPPORTED_CONNECTION_CHOICE_KEY}.${this._environmentService.remoteAuthority}`, allowed,
|
|
74
|
+
this.storageService.store(`${REMOTE_UNSUPPORTED_CONNECTION_CHOICE_KEY}.${this._environmentService.remoteAuthority}`, allowed, StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
68
75
|
}
|
|
69
76
|
return allowed;
|
|
70
77
|
}
|
|
@@ -72,12 +79,12 @@ let InitialRemoteConnectionHealthContribution = class InitialRemoteConnectionHea
|
|
|
72
79
|
try {
|
|
73
80
|
const environment = await this._remoteAgentService.getRawEnvironment();
|
|
74
81
|
if (environment && environment.isUnsupportedGlibc) {
|
|
75
|
-
let allowed = this.storageService.getBoolean(`${REMOTE_UNSUPPORTED_CONNECTION_CHOICE_KEY}.${this._environmentService.remoteAuthority}`,
|
|
82
|
+
let allowed = this.storageService.getBoolean(`${REMOTE_UNSUPPORTED_CONNECTION_CHOICE_KEY}.${this._environmentService.remoteAuthority}`, StorageScope.PROFILE);
|
|
76
83
|
if (allowed === undefined) {
|
|
77
84
|
allowed = await this._confirmConnection();
|
|
78
85
|
}
|
|
79
86
|
if (allowed) {
|
|
80
|
-
const bannerDismissedVersion = this.storageService.get(`${BANNER_REMOTE_UNSUPPORTED_CONNECTION_DISMISSED_KEY}`,
|
|
87
|
+
const bannerDismissedVersion = this.storageService.get(`${BANNER_REMOTE_UNSUPPORTED_CONNECTION_DISMISSED_KEY}`, StorageScope.PROFILE) ?? '';
|
|
81
88
|
const shouldShowBanner = bannerDismissedVersion.slice(0, bannerDismissedVersion.lastIndexOf('.')) !== this.productService.version.slice(0, this.productService.version.lastIndexOf('.'));
|
|
82
89
|
if (shouldShowBanner) {
|
|
83
90
|
const actions = [
|
|
@@ -98,7 +105,7 @@ let InitialRemoteConnectionHealthContribution = class InitialRemoteConnectionHea
|
|
|
98
105
|
icon: Codicon.warning,
|
|
99
106
|
closeLabel: `Do not show again in v${this.productService.version}`,
|
|
100
107
|
onClose: () => {
|
|
101
|
-
this.storageService.store(`${BANNER_REMOTE_UNSUPPORTED_CONNECTION_DISMISSED_KEY}`, this.productService.version,
|
|
108
|
+
this.storageService.store(`${BANNER_REMOTE_UNSUPPORTED_CONNECTION_DISMISSED_KEY}`, this.productService.version, StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
102
109
|
}
|
|
103
110
|
});
|
|
104
111
|
}
|
|
@@ -7,6 +7,7 @@ import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
|
7
7
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
8
8
|
import { MenuId, registerAction2, Action2, MenuRegistry, MenuItemAction } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
9
9
|
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
10
|
+
import { StatusbarAlignment } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
10
11
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
|
|
11
12
|
import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
|
|
12
13
|
import { RawContextKey, ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
@@ -16,6 +17,7 @@ import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
|
16
17
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
17
18
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
18
19
|
import { IBrowserWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
20
|
+
import { PersistentConnectionEventType } from 'vscode/vscode/vs/platform/remote/common/remoteAgentConnection';
|
|
19
21
|
import { IRemoteAuthorityResolverService } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver.service';
|
|
20
22
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
21
23
|
import { isWeb, PlatformToString, platform } from 'vscode/vscode/vs/base/common/platform';
|
|
@@ -32,7 +34,10 @@ import { VIEWLET_ID, LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID } from 'vs
|
|
|
32
34
|
import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
33
35
|
import { RemoteNameContext, VirtualWorkspaceContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
34
36
|
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
|
|
37
|
+
import { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
35
38
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
39
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
40
|
+
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
36
41
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
37
42
|
import { DomEmitter } from 'vscode/vscode/vs/base/browser/event';
|
|
38
43
|
import { ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
@@ -138,8 +143,8 @@ let RemoteStatusIndicator = class RemoteStatusIndicator extends Disposable {
|
|
|
138
143
|
title: ( localize2WithPath(_moduleId, 1, "Show Remote Menu")),
|
|
139
144
|
f1: true,
|
|
140
145
|
keybinding: {
|
|
141
|
-
weight:
|
|
142
|
-
primary:
|
|
146
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
147
|
+
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyO,
|
|
143
148
|
}
|
|
144
149
|
});
|
|
145
150
|
this.run = () => that.showRemoteMenu();
|
|
@@ -180,7 +185,7 @@ let RemoteStatusIndicator = class RemoteStatusIndicator extends Disposable {
|
|
|
180
185
|
});
|
|
181
186
|
this.run = (accessor, input) => {
|
|
182
187
|
const paneCompositeService = accessor.get(IPaneCompositePartService);
|
|
183
|
-
return paneCompositeService.openPaneComposite(VIEWLET_ID,
|
|
188
|
+
return paneCompositeService.openPaneComposite(VIEWLET_ID, ViewContainerLocation.Sidebar, true).then(viewlet => {
|
|
184
189
|
if (viewlet) {
|
|
185
190
|
(viewlet?.getViewPaneContainer()).search(`@recommended:remotes`);
|
|
186
191
|
viewlet.focus();
|
|
@@ -208,15 +213,15 @@ let RemoteStatusIndicator = class RemoteStatusIndicator extends Disposable {
|
|
|
208
213
|
if (connection) {
|
|
209
214
|
this._register(connection.onDidStateChange((e) => {
|
|
210
215
|
switch (e.type) {
|
|
211
|
-
case
|
|
212
|
-
case
|
|
213
|
-
case
|
|
216
|
+
case PersistentConnectionEventType.ConnectionLost:
|
|
217
|
+
case PersistentConnectionEventType.ReconnectionRunning:
|
|
218
|
+
case PersistentConnectionEventType.ReconnectionWait:
|
|
214
219
|
this.setConnectionState('reconnecting');
|
|
215
220
|
break;
|
|
216
|
-
case
|
|
221
|
+
case PersistentConnectionEventType.ReconnectionPermanentFailure:
|
|
217
222
|
this.setConnectionState('disconnected');
|
|
218
223
|
break;
|
|
219
|
-
case
|
|
224
|
+
case PersistentConnectionEventType.ConnectionGain:
|
|
220
225
|
this.setConnectionState('connected');
|
|
221
226
|
break;
|
|
222
227
|
}
|
|
@@ -462,7 +467,7 @@ let RemoteStatusIndicator = class RemoteStatusIndicator extends Disposable {
|
|
|
462
467
|
this.remoteStatusEntry.update(properties);
|
|
463
468
|
}
|
|
464
469
|
else {
|
|
465
|
-
this.remoteStatusEntry = this.statusbarService.addEntry(properties, 'status.host',
|
|
470
|
+
this.remoteStatusEntry = this.statusbarService.addEntry(properties, 'status.host', StatusbarAlignment.LEFT, Number.MAX_VALUE );
|
|
466
471
|
}
|
|
467
472
|
}
|
|
468
473
|
withNetworkStatus(initialText, initialTooltip, showProgress) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
2
2
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
3
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
3
4
|
import { RemoteStartEntry } from './remoteStartEntry.js';
|
|
4
5
|
|
|
5
6
|
( Registry.as(Extensions.Workbench))
|
|
6
|
-
.registerWorkbenchContribution(RemoteStartEntry,
|
|
7
|
+
.registerWorkbenchContribution(RemoteStartEntry, LifecyclePhase.Restored);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { Extensions, registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
2
|
+
import { Extensions, registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
3
3
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
4
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
4
5
|
import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
|
|
5
|
-
import { OS, isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
6
|
+
import { OS, OperatingSystem, isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
6
7
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
7
8
|
import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
8
9
|
import { ILoggerService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
@@ -34,9 +35,9 @@ let LabelContribution = class LabelContribution {
|
|
|
34
35
|
const os = remoteEnvironment?.os || OS;
|
|
35
36
|
const formatting = {
|
|
36
37
|
label: '${path}',
|
|
37
|
-
separator: os ===
|
|
38
|
-
tildify: os !==
|
|
39
|
-
normalizeDriveLetter: os ===
|
|
38
|
+
separator: os === OperatingSystem.Windows ? '\\' : '/',
|
|
39
|
+
tildify: os !== OperatingSystem.Windows,
|
|
40
|
+
normalizeDriveLetter: os === OperatingSystem.Windows,
|
|
40
41
|
workspaceSuffix: isWeb ? undefined : Schemas.vscodeRemote
|
|
41
42
|
};
|
|
42
43
|
this.labelService.registerFormatter({
|
|
@@ -121,9 +122,9 @@ RemoteInvalidWorkspaceDetector = ( (__decorate([
|
|
|
121
122
|
( (__param(5, IRemoteAgentService)))
|
|
122
123
|
], RemoteInvalidWorkspaceDetector)));
|
|
123
124
|
const workbenchContributionsRegistry = ( (Registry.as(Extensions.Workbench)));
|
|
124
|
-
registerWorkbenchContribution2(LabelContribution.ID, LabelContribution,
|
|
125
|
-
workbenchContributionsRegistry.registerWorkbenchContribution(RemoteChannelsContribution,
|
|
126
|
-
registerWorkbenchContribution2(RemoteInvalidWorkspaceDetector.ID, RemoteInvalidWorkspaceDetector,
|
|
125
|
+
registerWorkbenchContribution2(LabelContribution.ID, LabelContribution, WorkbenchPhase.BlockStartup);
|
|
126
|
+
workbenchContributionsRegistry.registerWorkbenchContribution(RemoteChannelsContribution, LifecyclePhase.Restored);
|
|
127
|
+
registerWorkbenchContribution2(RemoteInvalidWorkspaceDetector.ID, RemoteInvalidWorkspaceDetector, WorkbenchPhase.BlockStartup);
|
|
127
128
|
{
|
|
128
129
|
class TriggerReconnectAction extends Action2 {
|
|
129
130
|
constructor() {
|
|
@@ -3,7 +3,7 @@ import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { getMediaOrTextMime } from 'vscode/vscode/vs/base/common/mime';
|
|
5
5
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
6
|
-
import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
|
|
6
|
+
import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
|
|
7
7
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
8
8
|
|
|
9
9
|
let BrowserRemoteResourceLoader = class BrowserRemoteResourceLoader extends Disposable {
|
|
@@ -24,7 +24,7 @@ let BrowserRemoteResourceLoader = class BrowserRemoteResourceLoader extends Disp
|
|
|
24
24
|
}
|
|
25
25
|
catch (e) {
|
|
26
26
|
const str = VSBuffer.fromString(e.message).buffer;
|
|
27
|
-
if (e instanceof FileOperationError && e.fileOperationResult ===
|
|
27
|
+
if (e instanceof FileOperationError && e.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
|
|
28
28
|
return request.respondWith(404, str, {});
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
@@ -10,7 +10,7 @@ import { ISignService } from 'vscode/vscode/vs/platform/sign/common/sign.service
|
|
|
10
10
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
11
11
|
import 'vscode/vscode/vs/platform/notification/common/notification';
|
|
12
12
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
13
|
-
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
13
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
14
14
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
15
15
|
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
16
16
|
import { IRemoteSocketFactoryService } from 'vscode/vscode/vs/platform/remote/common/remoteSocketFactoryService.service';
|
|
@@ -71,6 +71,6 @@ RemoteConnectionFailureNotificationContribution = ( (__decorate([
|
|
|
71
71
|
( (__param(1, IDialogService))),
|
|
72
72
|
( (__param(2, IHostService)))
|
|
73
73
|
], RemoteConnectionFailureNotificationContribution)));
|
|
74
|
-
registerWorkbenchContribution2(RemoteConnectionFailureNotificationContribution.ID, RemoteConnectionFailureNotificationContribution,
|
|
74
|
+
registerWorkbenchContribution2(RemoteConnectionFailureNotificationContribution.ID, RemoteConnectionFailureNotificationContribution, WorkbenchPhase.BlockRestore);
|
|
75
75
|
|
|
76
76
|
export { RemoteAgentService };
|
|
@@ -8,16 +8,19 @@ import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/use
|
|
|
8
8
|
import { IRemoteUserDataProfilesService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/remoteUserDataProfiles.service';
|
|
9
9
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
10
10
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
11
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
11
12
|
import { IActiveLanguagePackService } from 'vscode/vscode/vs/workbench/services/localization/common/locale.service';
|
|
13
|
+
import { IWorkbenchExtensionManagementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
12
14
|
|
|
13
15
|
let RemoteExtensionsScannerService = class RemoteExtensionsScannerService {
|
|
14
|
-
constructor(remoteAgentService, environmentService, userDataProfileService, remoteUserDataProfilesService,
|
|
16
|
+
constructor(remoteAgentService, environmentService, userDataProfileService, remoteUserDataProfilesService, activeLanguagePackService, extensionManagementService, logService) {
|
|
15
17
|
this.remoteAgentService = remoteAgentService;
|
|
16
18
|
this.environmentService = environmentService;
|
|
17
19
|
this.userDataProfileService = userDataProfileService;
|
|
18
20
|
this.remoteUserDataProfilesService = remoteUserDataProfilesService;
|
|
19
|
-
this.logService = logService;
|
|
20
21
|
this.activeLanguagePackService = activeLanguagePackService;
|
|
22
|
+
this.extensionManagementService = extensionManagementService;
|
|
23
|
+
this.logService = logService;
|
|
21
24
|
}
|
|
22
25
|
whenExtensionsReady() {
|
|
23
26
|
return this.withChannel(channel => channel.call('whenExtensionsReady'), undefined);
|
|
@@ -27,7 +30,13 @@ let RemoteExtensionsScannerService = class RemoteExtensionsScannerService {
|
|
|
27
30
|
const languagePack = await this.activeLanguagePackService.getExtensionIdProvidingCurrentLocale();
|
|
28
31
|
return await this.withChannel(async (channel) => {
|
|
29
32
|
const profileLocation = this.userDataProfileService.currentProfile.isDefault ? undefined : (await this.remoteUserDataProfilesService.getRemoteProfile(this.userDataProfileService.currentProfile)).extensionsResource;
|
|
30
|
-
const scannedExtensions = await channel.call('scanExtensions', [
|
|
33
|
+
const scannedExtensions = await channel.call('scanExtensions', [
|
|
34
|
+
language,
|
|
35
|
+
profileLocation,
|
|
36
|
+
this.extensionManagementService.getInstalledWorkspaceExtensionLocations(),
|
|
37
|
+
this.environmentService.extensionDevelopmentLocationURI,
|
|
38
|
+
languagePack
|
|
39
|
+
]);
|
|
31
40
|
scannedExtensions.forEach((extension) => {
|
|
32
41
|
extension.extensionLocation = URI.revive(extension.extensionLocation);
|
|
33
42
|
});
|
|
@@ -67,8 +76,9 @@ RemoteExtensionsScannerService = ( __decorate([
|
|
|
67
76
|
( __param(1, IWorkbenchEnvironmentService)),
|
|
68
77
|
( __param(2, IUserDataProfileService)),
|
|
69
78
|
( __param(3, IRemoteUserDataProfilesService)),
|
|
70
|
-
( __param(4,
|
|
71
|
-
( __param(5,
|
|
79
|
+
( __param(4, IActiveLanguagePackService)),
|
|
80
|
+
( __param(5, IWorkbenchExtensionManagementService)),
|
|
81
|
+
( __param(6, ILogService))
|
|
72
82
|
], RemoteExtensionsScannerService));
|
|
73
83
|
|
|
74
84
|
export { RemoteExtensionsScannerService };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getErrorMessage } from 'vscode/vscode/vs/base/common/errors';
|
|
2
2
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
3
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
4
|
+
import { OperatingSystem } from 'vscode/vscode/vs/base/common/platform';
|
|
4
5
|
import { DiskFileSystemProviderClient } from '../../../../platform/files/common/diskFileSystemProviderClient.js';
|
|
5
6
|
|
|
6
7
|
const REMOTE_FILE_SYSTEM_CHANNEL_NAME = 'remoteFilesystem';
|
|
@@ -33,7 +34,7 @@ class RemoteFileSystemProviderClient extends DiskFileSystemProviderClient {
|
|
|
33
34
|
return disposables;
|
|
34
35
|
}
|
|
35
36
|
constructor(remoteAgentEnvironment, connection) {
|
|
36
|
-
super(connection.getChannel(REMOTE_FILE_SYSTEM_CHANNEL_NAME), { pathCaseSensitive: remoteAgentEnvironment.os ===
|
|
37
|
+
super(connection.getChannel(REMOTE_FILE_SYSTEM_CHANNEL_NAME), { pathCaseSensitive: remoteAgentEnvironment.os === OperatingSystem.Linux });
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
3
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
3
4
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
4
5
|
import { AbstractTunnelService, isTunnelProvider } from 'vscode/vscode/vs/platform/tunnel/common/tunnel';
|
|
5
6
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|