@@ -13,8 +13,12 @@ import { FileAccess } from 'vs/base/common/network';
13
13
import { AuthType } from 'vs/base/common/auth' ;
14
14
15
15
export const serverOptions : OptionDescriptions < ServerParsedArgs > = {
16
+ //#region @coder
16
17
'auth' : { type : 'string' } ,
17
18
'port' : { type : 'string' } ,
19
+ 'ignore-last-opened' : { type : 'boolean' } ,
20
+ //#endregion
21
+
18
22
'pick-port' : { type : 'string' } ,
19
23
'connectionToken' : { type : 'string' } ,
20
24
'connection-secret' : { type : 'string' , description : nls . localize ( 'connection-secret' , "Path to file that contains the connection token. This will require that all incoming connections know the secret." ) } ,
@@ -61,7 +65,11 @@ export const serverOptions: OptionDescriptions<ServerParsedArgs> = {
61
65
} ;
62
66
63
67
export interface ServerParsedArgs {
68
+ //#region
64
69
auth ?: AuthType ;
70
+ 'ignore-last-opened' ?: boolean ;
71
+ //#endregion
72
+
65
73
port ?: string ;
66
74
'pick-port' ?: string ;
67
75
connectionToken ?: string ;
@@ -124,15 +132,20 @@ export const IServerEnvironmentService = refineServiceDecorator<IEnvironmentServ
124
132
125
133
export interface IServerEnvironmentService extends INativeEnvironmentService {
126
134
readonly args : ServerParsedArgs ;
135
+
136
+ //#region @coder
127
137
readonly serviceWorkerFileName : string ;
128
138
readonly serviceWorkerPath : string ;
129
139
readonly proxyUri : string ;
130
140
readonly auth : AuthType ;
141
+ readonly ignoreLastOpened : boolean ;
142
+ //#endregion
131
143
}
132
144
133
145
export class ServerEnvironmentService extends NativeEnvironmentService implements IServerEnvironmentService {
134
146
override get args ( ) : ServerParsedArgs { return super . args as ServerParsedArgs ; }
135
147
148
+ //#region @coder
136
149
public get auth ( ) : AuthType {
137
150
return this . args [ 'auth' ] || AuthType . None ;
138
151
}
@@ -149,4 +162,10 @@ export class ServerEnvironmentService extends NativeEnvironmentService implement
149
162
public get proxyUri ( ) : string {
150
163
return '/proxy/{port}' ;
151
164
}
165
+
166
+ public get ignoreLastOpened ( ) : boolean {
167
+ return ! ! this . args [ 'ignore-last-opened' ] ;
168
+ }
169
+
170
+ //#endregion
152
171
}
0 commit comments