@@ -372,6 +372,8 @@ func NewJSContextFromRequest(req *http.Request, db database.DB) JSContext {
372
372
373
373
codyEnabled , _ := cody .IsCodyEnabled (ctx , db )
374
374
375
+ isDotComMode := dotcom .SourcegraphDotComMode ()
376
+
375
377
// 🚨 SECURITY: This struct is sent to all users regardless of whether or
376
378
// not they are logged in, for example on an auth.public=false private
377
379
// server. Including secret fields here is OK if it is based on the user's
@@ -401,7 +403,7 @@ func NewJSContextFromRequest(req *http.Request, db database.DB) JSContext {
401
403
NeedServerRestart : globals .ConfigurationServerFrontendOnly .NeedServerRestart (),
402
404
DeployType : deploy .Type (),
403
405
404
- SourcegraphDotComMode : dotcom . SourcegraphDotComMode () ,
406
+ SourcegraphDotComMode : isDotComMode ,
405
407
406
408
BillingPublishableKey : BillingPublishableKey ,
407
409
@@ -443,10 +445,11 @@ func NewJSContextFromRequest(req *http.Request, db database.DB) JSContext {
443
445
444
446
// This used to be hardcoded configuration on the frontend.
445
447
// https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph@ec5cc97a11c3f78743388b85b9ae0f1bc5d43932/-/blob/client/web/src/enterprise/EnterpriseWebApp.tsx?L63-71
446
- CodeIntelligenceEnabled : true ,
447
- SearchContextsEnabled : true ,
448
- NotebooksEnabled : true ,
449
- CodeMonitoringEnabled : true ,
448
+ CodeIntelligenceEnabled : true ,
449
+ SearchContextsEnabled : true ,
450
+ NotebooksEnabled : true ,
451
+ // Code monitoring should be disabled on DotCom.
452
+ CodeMonitoringEnabled : ! isDotComMode ,
450
453
SearchAggregationEnabled : true ,
451
454
OwnEnabled : true ,
452
455
0 commit comments