@@ -29,7 +29,7 @@ import { getGitpodVersion, isFeatureSupported } from './featureSupport';
29
29
import SSHConfiguration from './ssh/sshConfig' ;
30
30
import { isWindows } from './common/platform' ;
31
31
import { untildify } from './common/files' ;
32
- import { ExperimentalSettings } from './experiments' ;
32
+ import { ExperimentalSettings , isUserOverrideSetting } from './experiments' ;
33
33
34
34
interface SSHConnectionParams {
35
35
workspaceId : string ;
@@ -715,7 +715,7 @@ export default class RemoteConnector extends Disposable {
715
715
return ;
716
716
}
717
717
if ( action === configureSSH ) {
718
- const serviceUrl = new URL ( sshParams . gitpodHost ) . toString ( ) . replace ( / \/ $ / , '' ) ;
718
+ const serviceUrl = getServiceURL ( sshParams . gitpodHost ) ;
719
719
const externalUrl = sshKeysSupported ? `${ serviceUrl } /keys` : 'https://www.gitpod.io/docs/configure/ssh#create-an-ssh-key' ;
720
720
await vscode . env . openExternal ( vscode . Uri . parse ( externalUrl ) ) ;
721
721
throw new Error ( `SSH password modal dialog, Configure SSH` ) ;
@@ -776,9 +776,11 @@ export default class RemoteConnector extends Disposable {
776
776
777
777
this . logger . info ( 'Opening Gitpod workspace' , uri . toString ( ) ) ;
778
778
779
- const userOverride = this . experiments . isUserOverride ( 'gitpod.remote.useLocalApp' ) ;
780
- // const forceUseLocalApp = vscode.workspace.getConfiguration('gitpod').get<boolean>('remote.useLocalApp')!;
781
- const forceUseLocalApp = ( await this . experiments . get < boolean > ( 'gitpod.remote.useLocalApp' , session . account . id ) ) ! ;
779
+ // Only use experiment for SaaS
780
+ const forceUseLocalApp = getServiceURL ( params . gitpodHost ) === 'https://gitpod.io'
781
+ ? ( await this . experiments . get < boolean > ( 'gitpod.remote.useLocalApp' , session . account . id ) ) !
782
+ : vscode . workspace . getConfiguration ( 'gitpod' ) . get < boolean > ( 'remote.useLocalApp' ) ! ;
783
+ const userOverride = isUserOverrideSetting ( 'gitpod.remote.useLocalApp' ) ;
782
784
let sshDestination : string | undefined ;
783
785
if ( ! forceUseLocalApp ) {
784
786
try {
@@ -983,3 +985,7 @@ async function cancelGitpodRemoteHeartbeat() {
983
985
}
984
986
return result ;
985
987
}
988
+
989
+ function getServiceURL ( gitpodHost : string ) : string {
990
+ return new URL ( gitpodHost ) . toString ( ) . replace ( / \/ $ / , '' ) ;
991
+ }
0 commit comments