@@ -161,8 +161,8 @@ export default class RemoteConnector extends Disposable {
161161 if ( this . publicApi ) {
162162 return ;
163163 }
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 } ) ;
166166 this . logger . info ( `Going to use ${ usePublicApi ? 'public' : 'server' } API` ) ;
167167 if ( usePublicApi ) {
168168 this . publicApi = this . _register ( new GitpodPublicApi ( session . accessToken , gitpodHost , this . logger ) ) ;
@@ -738,10 +738,9 @@ export default class RemoteConnector extends Disposable {
738738
739739 await this . initPublicApi ( session , params . gitpodHost ) ;
740740
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' ) ) ! ;
745744 const userOverride = String ( isUserOverrideSetting ( 'gitpod.remote.useLocalApp' ) ) ;
746745 let sshDestination : SSHDestination | undefined ;
747746 if ( ! forceUseLocalApp ) {
@@ -855,10 +854,9 @@ export default class RemoteConnector extends Disposable {
855854 public async autoTunnelCommand ( gitpodHost : string , instanceId : string , enabled : boolean ) {
856855 const session = await this . getGitpodSession ( gitpodHost ) ;
857856 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' ) ) ! ;
862860 if ( ! forceUseLocalApp ) {
863861 const authority = vscode . Uri . parse ( gitpodHost ) . authority ;
864862 const configKey = `config/${ authority } ` ;
0 commit comments