@@ -3,6 +3,7 @@ import { cookies } from 'next/headers'
33import { redirect } from 'next/navigation'
44import { getSession } from '@/lib/auth'
55import { getActiveOrganizationId } from '@/lib/auth/session-response'
6+ import { isMothershipModelSelectorEnabled , isPlanModeEnabled } from '@/lib/mothership/feature-flags'
67import { isTableRowTtlEnabled } from '@/lib/table/ttl-availability'
78import { getQueryClient } from '@/app/_shell/providers/get-query-client'
89import { ImpersonationBanner } from '@/app/workspace/[workspaceId]/components/impersonation-banner'
@@ -48,7 +49,14 @@ export default async function WorkspaceLayout({
4849 }
4950
5051 const activeOrganizationId = getActiveOrganizationId ( session )
51- const [ cookieStore , initialOrgSettings , , tableRowTtlEnabled ] = await Promise . all ( [
52+ const [
53+ cookieStore ,
54+ initialOrgSettings ,
55+ ,
56+ tableRowTtlEnabled ,
57+ modelSelectorEnabled ,
58+ planModeEnabled ,
59+ ] = await Promise . all ( [
5260 cookies ( ) ,
5361 hostContext . hostOrganizationId
5462 ? getOrgWhitelabelSettings ( hostContext . hostOrganizationId )
@@ -61,6 +69,8 @@ export default async function WorkspaceLayout({
6169 activeOrganizationId
6270 ) ,
6371 isTableRowTtlEnabled ( ) ,
72+ isMothershipModelSelectorEnabled ( ) ,
73+ isPlanModeEnabled ( ) ,
6474 prefetchWorkspaceAccess ( queryClient , workspaceId , {
6575 kind : 'session' ,
6676 userId : session . user . id ,
@@ -71,7 +81,13 @@ export default async function WorkspaceLayout({
7181
7282 return (
7383 < HydrationBoundary state = { dehydrate ( queryClient ) } >
74- < FeatureFlagsProvider flags = { { 'table-row-ttl' : tableRowTtlEnabled } } >
84+ < FeatureFlagsProvider
85+ flags = { {
86+ 'table-row-ttl' : tableRowTtlEnabled ,
87+ 'mothership-model-selector' : modelSelectorEnabled ,
88+ 'mothership-plan-mode' : planModeEnabled ,
89+ } }
90+ >
7591 < WorkspaceHostProvider workspaceId = { workspaceId } initialContext = { hostContext } >
7692 < BrandingProvider
7793 hostOrganizationId = { hostContext . hostOrganizationId }
0 commit comments