@@ -161,8 +161,8 @@ export default class RemoteConnector extends Disposable {
161
161
if ( this . publicApi ) {
162
162
return ;
163
163
}
164
- this . experiments ;
165
- const usePublicApi = true ; // await this.experiments.getRaw<boolean>('gitpod_experimental_publicApi', session.account.id, { gitpodHost });
164
+
165
+ const usePublicApi = await this . experiments . getRaw < boolean > ( 'gitpod_experimental_publicApi' , session . account . id , { gitpodHost } ) ;
166
166
this . logger . info ( `Going to use ${ usePublicApi ? 'public' : 'server' } API` ) ;
167
167
if ( usePublicApi ) {
168
168
this . publicApi = this . _register ( new GitpodPublicApi ( session . accessToken , gitpodHost , this . logger ) ) ;
@@ -738,10 +738,9 @@ export default class RemoteConnector extends Disposable {
738
738
739
739
await this . initPublicApi ( session , params . gitpodHost ) ;
740
740
741
- const forceUseLocalApp = false ;
742
- // const forceUseLocalApp = getServiceURL(params.gitpodHost) === 'https://gitpod.io'
743
- // ? (await this.experiments.get<boolean>('gitpod.remote.useLocalApp', session.account.id, { gitpodHost: params.gitpodHost }))!
744
- // : (await this.experiments.get<boolean>('gitpod.remote.useLocalApp', session.account.id, { gitpodHost: params.gitpodHost }, 'gitpod_remote_useLocalApp_sh'))!;
741
+ const forceUseLocalApp = getServiceURL ( params . gitpodHost ) === 'https://gitpod.io'
742
+ ? ( await this . experiments . get < boolean > ( 'gitpod.remote.useLocalApp' , session . account . id , { gitpodHost : params . gitpodHost } ) ) !
743
+ : ( await this . experiments . get < boolean > ( 'gitpod.remote.useLocalApp' , session . account . id , { gitpodHost : params . gitpodHost } , 'gitpod_remote_useLocalApp_sh' ) ) ! ;
745
744
const userOverride = String ( isUserOverrideSetting ( 'gitpod.remote.useLocalApp' ) ) ;
746
745
let sshDestination : SSHDestination | undefined ;
747
746
if ( ! forceUseLocalApp ) {
@@ -855,10 +854,9 @@ export default class RemoteConnector extends Disposable {
855
854
public async autoTunnelCommand ( gitpodHost : string , instanceId : string , enabled : boolean ) {
856
855
const session = await this . getGitpodSession ( gitpodHost ) ;
857
856
if ( session ) {
858
- const forceUseLocalApp = false ;
859
- // const forceUseLocalApp = getServiceURL(gitpodHost) === 'https://gitpod.io'
860
- // ? (await this.experiments.get<boolean>('gitpod.remote.useLocalApp', session.account.id, { gitpodHost }))!
861
- // : (await this.experiments.get<boolean>('gitpod.remote.useLocalApp', session.account.id, { gitpodHost }, 'gitpod_remote_useLocalApp_sh'))!;
857
+ const forceUseLocalApp = getServiceURL ( gitpodHost ) === 'https://gitpod.io'
858
+ ? ( await this . experiments . get < boolean > ( 'gitpod.remote.useLocalApp' , session . account . id , { gitpodHost } ) ) !
859
+ : ( await this . experiments . get < boolean > ( 'gitpod.remote.useLocalApp' , session . account . id , { gitpodHost } , 'gitpod_remote_useLocalApp_sh' ) ) ! ;
862
860
if ( ! forceUseLocalApp ) {
863
861
const authority = vscode . Uri . parse ( gitpodHost ) . authority ;
864
862
const configKey = `config/${ authority } ` ;
0 commit comments