Skip to content

Commit 22aecc7

Browse files
committed
chore: merge in mainline
2 parents e475ab3 + 91f584f commit 22aecc7

16 files changed

+88
-36
lines changed

package-lock.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"date": "2025-05-01",
3+
"version": "1.63.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Q profile selection hangs when a region is blocked"
8+
},
9+
{
10+
"type": "Feature",
11+
"description": "Agentic coding experience: Amazon Q can now write code and run shell commands on your behalf"
12+
}
13+
]
14+
}

packages/amazonq/.changes/next-release/Bug Fix-415cbf18-1985-4e66-9918-6789133896c7.json

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Enable Amazon Q LSP in AL2 instances"
4+
}

packages/amazonq/.changes/next-release/Feature-ef539952-41de-40d0-870e-94aee31f36d3.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.63.0 2025-05-01
2+
3+
- **Bug Fix** Q profile selection hangs when a region is blocked
4+
- **Feature** Agentic coding experience: Amazon Q can now write code and run shell commands on your behalf
5+
16
## 1.62.0 2025-04-25
27

38
- **Bug Fix** Toast message to warn users if Developer Profile is not selected

packages/amazonq/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "amazon-q-vscode",
33
"displayName": "Amazon Q",
44
"description": "The most capable generative AI-powered assistant for building, operating, and transforming software, with advanced capabilities for managing data and AI",
5-
"version": "1.63.0-SNAPSHOT",
5+
"version": "1.64.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],

packages/amazonq/src/extension.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
maybeShowMinVscodeWarning,
3434
Experiments,
3535
isSageMaker,
36+
isAmazonInternalOs,
3637
} from 'aws-core-vscode/shared'
3738
import { ExtStartUpSources } from 'aws-core-vscode/telemetry'
3839
import { VSCODE_EXTENSION_ID } from 'aws-core-vscode/utils'
@@ -43,7 +44,7 @@ import { registerCommands } from './commands'
4344
import { focusAmazonQPanel } from 'aws-core-vscode/codewhispererChat'
4445
import { activate as activateAmazonqLsp } from './lsp/activation'
4546
import { activate as activateInlineCompletion } from './app/inline/activation'
46-
import { isAmazonInternalOs } from 'aws-core-vscode/shared'
47+
import { hasGlibcPatch } from './lsp/client'
4748

4849
export const amazonQContextPrefix = 'amazonq'
4950

@@ -122,9 +123,10 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
122123
await activateCodeWhisperer(extContext as ExtContext)
123124
if (
124125
(Experiments.instance.get('amazonqLSP', true) || Auth.instance.isInternalAmazonUser()) &&
125-
!isAmazonInternalOs()
126+
(!isAmazonInternalOs() || (await hasGlibcPatch()))
126127
) {
127128
// start the Amazon Q LSP for internal users first
129+
// for AL2, start LSP if glibc patch is found
128130
await activateAmazonqLsp(context)
129131
}
130132
if (!Experiments.instance.get('amazonqLSPInline', false)) {

packages/amazonq/src/lsp/client.ts

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ import {
3232
getLogger,
3333
undefinedIfEmpty,
3434
getOptOutPreference,
35+
isAmazonInternalOs,
36+
fs,
3537
} from 'aws-core-vscode/shared'
3638
import { processUtils } from 'aws-core-vscode/shared'
3739
import { activate } from './chat/activation'
@@ -41,6 +43,10 @@ import { ConfigSection, isValidConfigSection, toAmazonQLSPLogLevel } from './con
4143
const localize = nls.loadMessageBundle()
4244
const logger = getLogger('amazonqLsp.lspClient')
4345

46+
export async function hasGlibcPatch(): Promise<boolean> {
47+
return await fs.exists('/opt/vsc-sysroot/lib64/ld-linux-x86-64.so.2')
48+
}
49+
4450
export async function startLanguageServer(
4551
extensionContext: vscode.ExtensionContext,
4652
resourcePaths: AmazonQResourcePaths
@@ -56,21 +62,35 @@ export async function startLanguageServer(
5662
'--pre-init-encryption',
5763
'--set-credentials-encryption-key',
5864
]
65+
66+
const documentSelector = [{ scheme: 'file', language: '*' }]
67+
68+
const clientId = 'amazonq'
69+
const traceServerEnabled = Settings.instance.isSet(`${clientId}.trace.server`)
70+
let executable: string[] = []
71+
// apply the GLIBC 2.28 path to node js runtime binary
72+
if (isAmazonInternalOs() && (await hasGlibcPatch())) {
73+
executable = [
74+
'/opt/vsc-sysroot/lib64/ld-linux-x86-64.so.2',
75+
'--library-path',
76+
'/opt/vsc-sysroot/lib64',
77+
resourcePaths.node,
78+
]
79+
getLogger('amazonqLsp').info(`Patched node runtime with GLIBC to ${executable}`)
80+
} else {
81+
executable = [resourcePaths.node]
82+
}
83+
5984
const memoryWarnThreshold = 200 * processUtils.oneMB // 200 MB
6085
const serverOptions = createServerOptions({
6186
encryptionKey,
62-
executable: resourcePaths.node,
87+
executable: executable,
6388
serverModule,
6489
execArgv: argv,
6590
warnThresholds: { memory: memoryWarnThreshold },
6691
})
6792

68-
const documentSelector = [{ scheme: 'file', language: '*' }]
69-
70-
const clientId = 'amazonq'
71-
const traceServerEnabled = Settings.instance.isSet(`${clientId}.trace.server`)
72-
73-
await validateNodeExe(resourcePaths.node, resourcePaths.lsp, argv, logger)
93+
await validateNodeExe(executable, resourcePaths.lsp, argv, logger)
7494

7595
// Options to control the language client
7696
const clientOptions: LanguageClientOptions = {

packages/amazonq/src/lsp/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export function isValidConfigSection(section: unknown): section is ConfigSection
3131
}
3232

3333
export const defaultAmazonQLspConfig: ExtendedAmazonQLSPConfig = {
34-
manifestUrl: 'https://d3akiidp1wvqyg.cloudfront.net/qAgenticChatServer/0/manifest.json', // TODO swap this back
35-
supportedVersions: '*', // TODO swap this back
34+
manifestUrl: 'https://aws-toolkit-language-servers.amazonaws.com/qAgenticChatServer/0/manifest.json',
35+
supportedVersions: '1.*.*',
3636
id: 'AmazonQ', // used across IDEs for identifying global storage/local disk locations. Do not change.
3737
suppressPromptPrefix: 'amazonQ',
3838
path: undefined,

0 commit comments

Comments
 (0)