@@ -43,6 +43,7 @@ import {
4343 expandPath ,
4444 parseRemoteAuthority ,
4545} from "../util" ;
46+ import { vscodeProposed } from "../vscodeProposed" ;
4647import { WorkspaceMonitor } from "../workspace/workspaceMonitor" ;
4748
4849import {
@@ -62,8 +63,6 @@ export interface RemoteDetails extends vscode.Disposable {
6263}
6364
6465export class Remote {
65- // We use the proposed API to get access to useCustom in dialogs.
66- private readonly vscodeProposed : typeof vscode ;
6766 private readonly logger : Logger ;
6867 private readonly pathResolver : PathResolver ;
6968 private readonly cliManager : CliManager ;
@@ -76,7 +75,6 @@ export class Remote {
7675 private readonly commands : Commands ,
7776 private readonly extensionContext : vscode . ExtensionContext ,
7877 ) {
79- this . vscodeProposed = serviceContainer . getVsCodeProposed ( ) ;
8078 this . logger = serviceContainer . getLogger ( ) ;
8179 this . pathResolver = serviceContainer . getPathResolver ( ) ;
8280 this . cliManager = serviceContainer . getCliManager ( ) ;
@@ -268,7 +266,7 @@ export class Remote {
268266
269267 // Server versions before v0.14.1 don't support the vscodessh command!
270268 if ( ! featureSet . vscodessh ) {
271- await this . vscodeProposed . window . showErrorMessage (
269+ await vscodeProposed . window . showErrorMessage (
272270 "Incompatible Server" ,
273271 {
274272 detail :
@@ -304,16 +302,15 @@ export class Remote {
304302 }
305303 switch ( error . response ?. status ) {
306304 case 404 : {
307- const result =
308- await this . vscodeProposed . window . showInformationMessage (
309- `That workspace doesn't exist!` ,
310- {
311- modal : true ,
312- detail : `${ workspaceName } cannot be found on ${ baseUrlRaw } . Maybe it was deleted...` ,
313- useCustom : true ,
314- } ,
315- "Open Workspace" ,
316- ) ;
305+ const result = await vscodeProposed . window . showInformationMessage (
306+ `That workspace doesn't exist!` ,
307+ {
308+ modal : true ,
309+ detail : `${ workspaceName } cannot be found on ${ baseUrlRaw } . Maybe it was deleted...` ,
310+ useCustom : true ,
311+ } ,
312+ "Open Workspace" ,
313+ ) ;
317314 disposables . forEach ( ( d ) => {
318315 d . dispose ( ) ;
319316 } ) ;
@@ -345,7 +342,6 @@ export class Remote {
345342 workspace ,
346343 workspaceClient ,
347344 this . logger ,
348- this . vscodeProposed ,
349345 this . contextManager ,
350346 ) ;
351347 disposables . push (
@@ -366,12 +362,11 @@ export class Remote {
366362 featureSet ,
367363 this . logger ,
368364 this . pathResolver ,
369- this . vscodeProposed ,
370365 ) ;
371366 disposables . push ( stateMachine ) ;
372367
373368 try {
374- workspace = await this . vscodeProposed . window . withProgress (
369+ workspace = await vscodeProposed . window . withProgress (
375370 {
376371 location : vscode . ProgressLocation . Notification ,
377372 cancellable : false ,
@@ -452,10 +447,10 @@ export class Remote {
452447
453448 // Do some janky setting manipulation.
454449 this . logger . info ( "Modifying settings..." ) ;
455- const remotePlatforms = this . vscodeProposed . workspace
450+ const remotePlatforms = vscodeProposed . workspace
456451 . getConfiguration ( )
457452 . get < Record < string , string > > ( "remote.SSH.remotePlatform" , { } ) ;
458- const connTimeout = this . vscodeProposed . workspace
453+ const connTimeout = vscodeProposed . workspace
459454 . getConfiguration ( )
460455 . get < number | undefined > ( "remote.SSH.connectTimeout" ) ;
461456
@@ -885,7 +880,7 @@ export class Remote {
885880 continue ;
886881 }
887882
888- const result = await this . vscodeProposed . window . showErrorMessage (
883+ const result = await vscodeProposed . window . showErrorMessage (
889884 "Unexpected SSH Config Option" ,
890885 {
891886 useCustom : true ,
@@ -1007,7 +1002,7 @@ export class Remote {
10071002 }
10081003 // VS Code caches resource label formatters in it's global storage SQLite database
10091004 // under the key "memento/cachedResourceLabelFormatters2".
1010- return this . vscodeProposed . workspace . registerResourceLabelFormatter ( {
1005+ return vscodeProposed . workspace . registerResourceLabelFormatter ( {
10111006 scheme : "vscode-remote" ,
10121007 // authority is optional but VS Code prefers formatters that most
10131008 // accurately match the requested authority, so we include it.
0 commit comments