@@ -11,8 +11,9 @@ import { fromString } from './providers/credentials'
11
11
import { registerCommandsWithVSCode } from '../shared/vscode/commands2'
12
12
import { AuthCommandBackend , AuthCommandDeclarations } from './commands'
13
13
import { getLogger } from '../shared/logger'
14
- import { isInDevEnv } from '../codecatalyst/utils'
15
14
import { ExtensionUse } from './utils'
15
+ import { isCloud9 } from '../shared/extensionUtilities'
16
+ import { isInDevEnv } from '../codecatalyst/utils'
16
17
17
18
export async function initialize (
18
19
extensionContext : vscode . ExtensionContext ,
@@ -41,17 +42,20 @@ export async function initialize(
41
42
* Show the Manage Connections page when the extension starts up, if it should be shown.
42
43
*/
43
44
async function showManageConnectionsOnStartup ( ) {
45
+ // Do not show connection management to user in certain scenarios.
46
+ let reason : string = ''
44
47
if ( ! ExtensionUse . instance . isFirstUse ( ) ) {
45
- getLogger ( ) . debug (
46
- 'firstStartup: This is not the users first use of the extension, skipping showing Add Connections page.'
47
- )
48
- return
48
+ reason = 'This is not the users first use of the extension'
49
+ } else if ( isInDevEnv ( ) ) {
50
+ reason = 'The user is in a Dev Evironment'
51
+ } else if ( isCloud9 ( 'any' ) ) {
52
+ reason = 'The user is in Cloud9'
49
53
}
50
-
51
- if ( isInDevEnv ( ) ) {
52
- getLogger ( ) . debug ( 'firstStartup: Detected we are in Dev Env, skipping showing Add Connections page.' )
54
+ if ( reason ) {
55
+ getLogger ( ) . debug ( `firstStartup: ${ reason } . Skipped showing Add Connections page.` )
53
56
return
54
57
}
55
58
56
- AuthCommandDeclarations . instance . declared . showConnectionsPage . execute ( 'firstStartup' )
59
+ // Show connection management to user
60
+ AuthCommandDeclarations . instance . declared . showManageConnections . execute ( 'firstStartup' )
57
61
}
0 commit comments