@@ -136,6 +136,7 @@ import { ctxIsAborted, runWithRequestContext, runWithSubjectId } from "../util/r
136
136
import { SubjectId } from "../auth/subject-id" ;
137
137
import { ApplicationError , ErrorCodes } from "@gitpod/gitpod-protocol/lib/messaging/error" ;
138
138
import { IDESettingsVersion } from "@gitpod/gitpod-protocol/lib/ide-protocol" ;
139
+ import { getFeatureFlagEnableExperimentalJBTB } from "../util/featureflags" ;
139
140
140
141
export interface StartWorkspaceOptions extends Omit < GitpodServer . StartWorkspaceOptions , "ideSettings" > {
141
142
excludeFeatureFlags ?: NamedWorkspaceFeatureFlag [ ] ;
@@ -301,16 +302,11 @@ export class WorkspaceStarter {
301
302
302
303
let ideSettings = options . ideSettings ;
303
304
304
- const enableExperimentalJBTB = await getExperimentsClientForBackend ( ) . getValueAsync (
305
- "enable_experimental_jbtb" ,
306
- false ,
307
- { user } ,
308
- ) ;
309
-
310
305
// if no explicit ideSettings are passed, we use the one from the last workspace instance
311
306
if ( lastValidWorkspaceInstance ) {
312
307
const ideConfig = lastValidWorkspaceInstance . configuration ?. ideConfig ;
313
308
if ( ideConfig ?. ide ) {
309
+ const enableExperimentalJBTB = await getFeatureFlagEnableExperimentalJBTB ( user . id ) ;
314
310
const preferToolbox = ! enableExperimentalJBTB
315
311
? false
316
312
: ideSettings ?. preferToolbox ??
@@ -922,11 +918,7 @@ export class WorkspaceStarter {
922
918
} ;
923
919
if ( ideConfig . ideSettings && ideConfig . ideSettings . trim ( ) !== "" ) {
924
920
try {
925
- const enableExperimentalJBTB = await getExperimentsClientForBackend ( ) . getValueAsync (
926
- "enable_experimental_jbtb" ,
927
- false ,
928
- { user } ,
929
- ) ;
921
+ const enableExperimentalJBTB = await getFeatureFlagEnableExperimentalJBTB ( user . id ) ;
930
922
const ideSettings : IDESettings = JSON . parse ( ideConfig . ideSettings ) ;
931
923
configuration . ideConfig ! . ide = ideSettings . defaultIde ;
932
924
configuration . ideConfig ! . useLatest = ! ! ideSettings . useLatestVersion ;
0 commit comments