|
3 | 3 | * SPDX-License-Identifier: Apache-2.0 |
4 | 4 | */ |
5 | 5 |
|
6 | | -import { AuthUtils, CredentialsStore, LoginManager, initializeAuth } from 'aws-core-vscode/auth' |
| 6 | +import { Auth, AuthUtils, CredentialsStore, LoginManager, initializeAuth } from 'aws-core-vscode/auth' |
7 | 7 | import { activate as activateCodeWhisperer, shutdown as shutdownCodeWhisperer } from 'aws-core-vscode/codewhisperer' |
8 | 8 | import { makeEndpointsProvider, registerGenericCommands } from 'aws-core-vscode' |
9 | 9 | import { CommonAuthWebview } from 'aws-core-vscode/login' |
@@ -43,6 +43,7 @@ import { registerCommands } from './commands' |
43 | 43 | import { focusAmazonQPanel } from 'aws-core-vscode/codewhispererChat' |
44 | 44 | import { activate as activateAmazonqLsp } from './lsp/activation' |
45 | 45 | import { activate as activateInlineCompletion } from './app/inline/activation' |
| 46 | +import { isAmazonInternalOs } from 'aws-core-vscode/shared' |
46 | 47 |
|
47 | 48 | export const amazonQContextPrefix = 'amazonq' |
48 | 49 |
|
@@ -119,10 +120,13 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is |
119 | 120 | } |
120 | 121 | // This contains every lsp agnostic things (auth, security scan, code scan) |
121 | 122 | await activateCodeWhisperer(extContext as ExtContext) |
122 | | - if (Experiments.instance.get('amazonqLSP', false)) { |
| 123 | + if ( |
| 124 | + (Experiments.instance.get('amazonqLSP', false) || Auth.instance.isInternalAmazonUser()) && |
| 125 | + !isAmazonInternalOs() |
| 126 | + ) { |
| 127 | + // start the Amazon Q LSP for internal users first |
123 | 128 | await activateAmazonqLsp(context) |
124 | 129 | } |
125 | | - |
126 | 130 | if (!Experiments.instance.get('amazonqLSPInline', false)) { |
127 | 131 | await activateInlineCompletion() |
128 | 132 | } |
|
0 commit comments