@@ -372,6 +372,8 @@ func NewJSContextFromRequest(req *http.Request, db database.DB) JSContext {
372372
373373 codyEnabled , _ := cody .IsCodyEnabled (ctx , db )
374374
375+ isDotComMode := dotcom .SourcegraphDotComMode ()
376+
375377 // 🚨 SECURITY: This struct is sent to all users regardless of whether or
376378 // not they are logged in, for example on an auth.public=false private
377379 // 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 {
401403 NeedServerRestart : globals .ConfigurationServerFrontendOnly .NeedServerRestart (),
402404 DeployType : deploy .Type (),
403405
404- SourcegraphDotComMode : dotcom . SourcegraphDotComMode () ,
406+ SourcegraphDotComMode : isDotComMode ,
405407
406408 BillingPublishableKey : BillingPublishableKey ,
407409
@@ -443,10 +445,11 @@ func NewJSContextFromRequest(req *http.Request, db database.DB) JSContext {
443445
444446 // This used to be hardcoded configuration on the frontend.
445447 // 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 ,
450453 SearchAggregationEnabled : true ,
451454 OwnEnabled : true ,
452455
0 commit comments