@@ -19,7 +19,6 @@ import { IStorageService, IStorageValueChangeEvent, StorageScope, StorageTarget
19
19
import { ILogger , ILoggerService , ILogService } from 'vs/platform/log/common/log' ;
20
20
import { INativeEnvironmentService } from 'vs/platform/environment/common/environment' ;
21
21
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions' ;
22
- import { IStringDictionary } from 'vs/base/common/collections' ;
23
22
import { IQuickInputService , IQuickPickItem , IQuickPickSeparator , QuickPickItem } from 'vs/platform/quickinput/common/quickInput' ;
24
23
import { IOutputService , registerLogChannel } from 'vs/workbench/services/output/common/output' ;
25
24
import { IFileService } from 'vs/platform/files/common/files' ;
@@ -37,6 +36,7 @@ import { Schemas } from 'vs/base/common/network';
37
36
import { URI } from 'vs/base/common/uri' ;
38
37
import { joinPath } from 'vs/base/common/resources' ;
39
38
import { join } from 'vs/base/common/path' ;
39
+ import { ITunnelApplicationConfig } from 'vs/base/common/product' ;
40
40
41
41
export const REMOTE_TUNNEL_CATEGORY : ILocalizedString = {
42
42
original : 'Remote Tunnels' ,
@@ -80,7 +80,7 @@ export class RemoteTunnelWorkbenchContribution extends Disposable implements IWo
80
80
81
81
private readonly connectionStateContext : IContextKey < CONTEXT_KEY_STATES > ;
82
82
83
- private readonly serverConfiguration : { authenticationProviders : IStringDictionary < { scopes : string [ ] } > } ;
83
+ private readonly serverConfiguration : ITunnelApplicationConfig ;
84
84
85
85
#authenticationSessionId: string | undefined ;
86
86
private connectionInfo : ConnectionInfo | undefined ;
@@ -115,7 +115,7 @@ export class RemoteTunnelWorkbenchContribution extends Disposable implements IWo
115
115
const serverConfiguration = productService . tunnelApplicationConfig ;
116
116
if ( ! serverConfiguration || ! productService . tunnelApplicationName ) {
117
117
this . logger . error ( 'Missing \'tunnelApplicationConfig\' or \'tunnelApplicationName\' in product.json. Remote tunneling is not available.' ) ;
118
- this . serverConfiguration = { authenticationProviders : { } } ;
118
+ this . serverConfiguration = { authenticationProviders : { } , editorWebUrl : '' , extension : { extensionId : '' , friendlyName : '' } } ;
119
119
return ;
120
120
}
121
121
this . serverConfiguration = serverConfiguration ;
@@ -422,16 +422,23 @@ export class RemoteTunnelWorkbenchContribution extends Disposable implements IWo
422
422
const connectionInfo = await that . startTunnel ( false ) ;
423
423
if ( connectionInfo ) {
424
424
const linkToOpen = that . getLinkToOpen ( connectionInfo ) ;
425
+ const remoteExtension = that . serverConfiguration . extension ;
425
426
await notificationService . notify ( {
426
427
severity : Severity . Info ,
427
- message : localize ( { key : 'progress.turnOn.final' , comment : [ '{0} will be a host name, {1} will the link address to the web UI. [label](command:commandId) is a markdown lionk. Only translate label, never change the format' ] } ,
428
- "Remote tunnel access is enabled for [{0}](command:{4}). To access from a different machine, open [{1}]({2}) or use the Remote - Tunnels extension. Use the Account menu to [configure](command:{3}) or [turn off](command:{5})." ,
429
- connectionInfo . hostName , connectionInfo . domain , linkToOpen , RemoteTunnelCommandIds . manage , RemoteTunnelCommandIds . configure , RemoteTunnelCommandIds . turnOff ) ,
428
+ message :
429
+ localize (
430
+ {
431
+ key : 'progress.turnOn.final' ,
432
+ comment : [ '{0} will be a host name, {1} will the link address to the web UI, {6} an extesnion name. [label](command:commandId) is a markdown link. Only translate the label, do not modify the format' ]
433
+ } ,
434
+ "Remote tunnel access is enabled for [{0}](command:{4}). To access from a different machine, open [{1}]({2}) or use the {6} extension. Use the Account menu to [configure](command:{3}) or [turn off](command:{5})." ,
435
+ connectionInfo . hostName , connectionInfo . domain , linkToOpen , RemoteTunnelCommandIds . manage , RemoteTunnelCommandIds . configure , RemoteTunnelCommandIds . turnOff , remoteExtension . friendlyName
436
+ ) ,
430
437
actions : {
431
438
primary : [
432
439
new Action ( 'copyToClipboard' , localize ( 'action.copyToClipboard' , "Copy Browser Link to Clipboard" ) , undefined , true , ( ) => clipboardService . writeText ( linkToOpen ) ) ,
433
440
new Action ( 'showExtension' , localize ( 'action.showExtension' , "Show Extension" ) , undefined , true , ( ) => {
434
- return commandService . executeCommand ( 'workbench.extensions.action.showExtensionsWithIds' , [ 'ms-vscode.remote-server' ] ) ;
441
+ return commandService . executeCommand ( 'workbench.extensions.action.showExtensionsWithIds' , [ remoteExtension . extensionId ] ) ;
435
442
} )
436
443
]
437
444
}
@@ -440,7 +447,7 @@ export class RemoteTunnelWorkbenchContribution extends Disposable implements IWo
440
447
await notificationService . notify ( {
441
448
severity : Severity . Info ,
442
449
message : localize ( 'progress.turnOn.failed' ,
443
- "Unable to turn on the remote tunnel access. Check the Remote Tunnel log for details." ) ,
450
+ "Unable to turn on the remote tunnel access. Check the Remote Tunnel Service log for details." ) ,
444
451
} ) ;
445
452
await commandService . executeCommand ( RemoteTunnelCommandIds . showLog ) ;
446
453
}
@@ -622,7 +629,7 @@ export class RemoteTunnelWorkbenchContribution extends Disposable implements IWo
622
629
items . push ( { id : RemoteTunnelCommandIds . learnMore , label : RemoteTunnelCommandLabels . learnMore } ) ;
623
630
if ( this . connectionInfo && account ) {
624
631
quickPick . title = localize (
625
- { key : 'manage.title.on' , comment : [ '{0} will be a user account name, {1} the provider name (e.g. Github), {2} is the machine name' ] } ,
632
+ { key : 'manage.title.on' , comment : [ '{0} will be a user account name, {1} the provider name (e.g. Github), {2} is the host name' ] } ,
626
633
'Remote Machine Access enabled for {0}({1}) as {2}' , account . label , account . description , this . connectionInfo . hostName ) ;
627
634
items . push ( { id : RemoteTunnelCommandIds . copyToClipboard , label : RemoteTunnelCommandLabels . copyToClipboard , description : this . connectionInfo . domain } ) ;
628
635
} else {
0 commit comments