@@ -76,7 +76,7 @@ import { ILabelService } from 'vs/platform/label/common/label';
7676import { UserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfileService' ;
7777import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile' ;
7878import { BrowserUserDataProfilesService } from 'vs/platform/userDataProfile/browser/userDataProfile' ;
79- import { timeout } from 'vs/base/common/async' ;
79+ import { DeferredPromise , timeout } from 'vs/base/common/async' ;
8080import { windowLogId } from 'vs/workbench/services/log/common/logConstants' ;
8181import { LogService } from 'vs/platform/log/common/logService' ;
8282import { IRemoteSocketFactoryService , RemoteSocketFactoryService } from 'vs/platform/remote/common/remoteSocketFactoryService' ;
@@ -95,6 +95,7 @@ import { IEncryptionService } from 'vs/platform/encryption/common/encryptionServ
9595import { ISecretStorageService } from 'vs/platform/secrets/common/secrets' ;
9696import { TunnelSource } from 'vs/workbench/services/remote/common/tunnelModel' ;
9797import { mainWindow } from 'vs/base/browser/window' ;
98+ import { INotificationService , Severity } from 'vs/platform/notification/common/notification' ;
9899
99100export class BrowserMain extends Disposable {
100101
@@ -156,10 +157,27 @@ export class BrowserMain extends Disposable {
156157 const remoteExplorerService = accessor . get ( IRemoteExplorerService ) ;
157158 const labelService = accessor . get ( ILabelService ) ;
158159 const embedderTerminalService = accessor . get ( IEmbedderTerminalService ) ;
160+ const remoteAuthorityResolverService = accessor . get ( IRemoteAuthorityResolverService ) ;
161+ const notificationService = accessor . get ( INotificationService ) ;
162+
163+ async function showMessage < T extends string > ( severity : Severity , message : string , ...items : T [ ] ) : Promise < T | undefined > {
164+ const choice = new DeferredPromise < T | undefined > ( ) ;
165+ const handle = notificationService . prompt ( severity , message , items . map ( item => ( {
166+ label : item ,
167+ run : ( ) => choice . complete ( item )
168+ } ) ) ) ;
169+ const disposable = handle . onDidClose ( ( ) => {
170+ choice . complete ( undefined ) ;
171+ disposable . dispose ( ) ;
172+ } ) ;
173+ const result = await choice . p ;
174+ handle . close ( ) ;
175+ return result ;
176+ }
159177
160178 let logger : DelayedLogChannel | undefined = undefined ;
161179
162- return {
180+ return < IWorkbench > {
163181 commands : {
164182 executeCommand : ( command , ...args ) => commandService . executeCommand ( command , ...args )
165183 } ,
@@ -188,8 +206,16 @@ export class BrowserMain extends Disposable {
188206 window : {
189207 withProgress : ( options , task ) => progressService . withProgress ( options , task ) ,
190208 createTerminal : async ( options ) => embedderTerminalService . createTerminal ( options ) ,
209+ showInformationMessage : ( message , ...items ) => showMessage ( Severity . Info , message , ...items ) ,
191210 } ,
192211 workspace : {
212+ didResolveRemoteAuthority : async ( ) => {
213+ if ( ! this . configuration . remoteAuthority ) {
214+ return ;
215+ }
216+
217+ await remoteAuthorityResolverService . resolveAuthority ( this . configuration . remoteAuthority ) ;
218+ } ,
193219 openTunnel : async tunnelOptions => {
194220 const tunnel = assertIsDefined ( await remoteExplorerService . forward ( {
195221 remote : tunnelOptions . remoteAddress ,
0 commit comments