File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ class InitResponseModel(ResponseModel):
7070 ),
7171 ] = None
7272
73+ experimental : Annotated [bool | None , Field (title = "Enable experimental features" )] = None
74+
7375
7476class InitRequest (APIRequest ):
7577 """Initial client request to ensure user is logged in.
@@ -102,7 +104,10 @@ async def handle(
102104 # Not logged in. Only return motd and oauth2 options.
103105 # TODO: return oauth2 options
104106 if user is None :
105- return InitResponseModel (motd = motd )
107+ return InitResponseModel (
108+ motd = motd ,
109+ experimental = nebula .config .enable_experimental or None ,
110+ )
106111
107112 # TODO: get preferred user language
108113 lang : LanguageCode = user .language
@@ -119,4 +124,5 @@ async def handle(
119124 settings = client_settings ,
120125 frontend_plugins = plugins ,
121126 scoped_endpoints = server_context .scoped_endpoints ,
127+ experimental = nebula .config .enable_experimental or None ,
122128 )
Original file line number Diff line number Diff line change @@ -59,6 +59,11 @@ class NebulaConfig(BaseModel):
5959 description = "Logging level" ,
6060 )
6161
62+ enable_experimental : bool = Field (
63+ False ,
64+ description = "Enable experimental features" ,
65+ )
66+
6267
6368def load_config () -> NebulaConfig :
6469 prefix = "NEBULA_"
You can’t perform that action at this time.
0 commit comments