Skip to content

Merge master into feature/flare-mega-LSP-gamma #7394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: feature/flare-mega-LSP-gamma
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f2b8091
deps(mynah): Bump mynah to 4.34.1 (#7391)
nkomonen-amazon May 28, 2025
77b54ab
Update CONTRIBUTING.md
nkomonen-amazon May 28, 2025
4caebad
Release 1.70.0
May 28, 2025
5bf8bfc
Update version to snapshot version: 1.71.0-SNAPSHOT
May 28, 2025
6cbe787
feat(amazonq): add the mcp field to client capabilities
yueny2020 May 29, 2025
fb1dae8
Merge pull request #7402 from yueny2020/mcpfromclient
yueny2020 May 29, 2025
9b13c5f
fix(tests): "rejected promise not handled" (#7403)
justinmk3 May 30, 2025
d41e749
ci: only publish amazonq as "latest" release #7408
justinmk3 May 30, 2025
12eece1
feat(lsp): forward chatOptionsUpdate to ui (#7397)
ctlai95 May 30, 2025
6e69d40
telemetry: avoid PII in openUrl metric
justinmk3 May 14, 2025
f9fce59
fix(lsp): handle ShowDocumentParams.external
justinmk3 May 13, 2025
14df48d
fix(amazonq): Revert "feat(amazonq): add the mcp field to client capa…
yueny2020 Jun 2, 2025
25ec061
Merge #7415 from justinmk3/fixes
justinmk3 Jun 3, 2025
0999e72
fix(amazonq): Revert "feat(amazonq): add the mcp field to client capa…
yueny2020 Jun 3, 2025
02a89c5
telemetry(amazonq): bumping up telemetry version to 1.0.323 (#7424)
laileni-aws Jun 4, 2025
3a9aca9
fix(amazonq): minor text update (#7420)
dhasani23 Jun 4, 2025
a7d939e
Release 1.71.0
Jun 4, 2025
d712ffd
Release 3.64.0
Jun 4, 2025
6c88e44
fix(amazonq): Add proxy configuration support with SSL Cert Validation
tsmithsz Jun 4, 2025
a78564a
Update version to snapshot version: 1.72.0-SNAPSHOT
Jun 6, 2025
1126c70
Update version to snapshot version: 3.65.0-SNAPSHOT
Jun 6, 2025
7e6786b
Merge release into master
Jun 6, 2025
62d50d9
feat(amazonq): Bundle LSP with the extension as fallback. (#7421)
leigaol Jun 6, 2025
523fc16
fix(amazonq): Add proxy configuration support with SSL Cert Validation
tsmithsz Jun 4, 2025
cdf1c2d
Merge pull request #7426 from tsmithsz/fix-proxy
tsmithsz Jun 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ If you need to report an issue attach these to give the most detailed informatio
- ![](./docs/images/logsView.png)
2. Click the gear icon on the bottom right and select `Debug`
- ![](./docs/images/logsSetDebug.png)
3. Click the gear icon again and select `Set As Default`. This will ensure we stay in `Debug` until explicitly changed
3. Click the gear icon again and select `Set As Default`. This will ensure we stay in `Debug` until explicitly changed.
- ![](./docs/images/logsSetDefault.png)
4. Open the Command Palette again and select `Reload Window`.
5. Now you should see additional `[debug]` prefixed logs in the output.
Expand Down
5 changes: 4 additions & 1 deletion buildspec/release/50githubrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ phases:
- echo "posting $VERSION with sha384 hash $HASH to GitHub"
- PKG_DISPLAY_NAME=$(grep -m 1 displayName packages/${TARGET_EXTENSION}/package.json | grep -o '[a-zA-z][^\"]\+' | tail -n1)
- RELEASE_MESSAGE="${PKG_DISPLAY_NAME} for VS Code $VERSION"
# Only set amazonq as "latest" release. This ensures https://api.github.com/repos/aws/aws-toolkit-vscode/releases/latest
# consistently points to the amazonq artifact, instead of being "random".
- LATEST="$([ "$TARGET_EXTENSION" = amazonq ] && echo '--latest' || echo '--latest=false' )"
- |
if [ "$STAGE" = "prod" ]; then
# note: the tag arg passed here should match what is in 10changeversion.yml
gh release create --repo $REPO --title "$PKG_DISPLAY_NAME $VERSION" --notes "$RELEASE_MESSAGE" -- "${TARGET_EXTENSION}/v${VERSION}" "$UPLOAD_TARGET" "$HASH_UPLOAD_TARGET"
gh release create "$LATEST" --repo $REPO --title "$PKG_DISPLAY_NAME $VERSION" --notes "$RELEASE_MESSAGE" -- "${TARGET_EXTENSION}/v${VERSION}" "$UPLOAD_TARGET" "$HASH_UPLOAD_TARGET"
else
echo "SKIPPED (stage=${STAGE}): 'gh release create --repo $REPO'"
fi
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"skippedTestReport": "ts-node ./scripts/skippedTestReport.ts ./packages/amazonq/test/e2e/"
},
"devDependencies": {
"@aws-toolkits/telemetry": "^1.0.322",
"@aws-toolkits/telemetry": "^1.0.323",
"@playwright/browser-chromium": "^1.43.1",
"@stylistic/eslint-plugin": "^2.11.0",
"@types/he": "^1.2.3",
Expand Down
10 changes: 10 additions & 0 deletions packages/amazonq/.changes/1.70.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"date": "2025-05-28",
"version": "1.70.0",
"entries": [
{
"type": "Removal",
"description": "Disable local workspace LSP"
}
]
}
5 changes: 5 additions & 0 deletions packages/amazonq/.changes/1.71.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"date": "2025-06-04",
"version": "1.71.0",
"entries": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Feature",
"description": "Launch LSP with bundled artifacts as fallback"
}

This file was deleted.

8 changes: 8 additions & 0 deletions packages/amazonq/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 1.71.0 2025-06-04

- Miscellaneous non-user-facing changes

## 1.70.0 2025-05-28

- **Removal** Disable local workspace LSP

## 1.69.0 2025-05-22

- **Bug Fix** /transform: avoid prompting user for target JDK path unnecessarily
Expand Down
8 changes: 7 additions & 1 deletion packages/amazonq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "amazon-q-vscode",
"displayName": "Amazon Q",
"description": "The most capable generative AI-powered assistant for building, operating, and transforming software, with advanced capabilities for managing data and AI",
"version": "1.70.0-SNAPSHOT",
"version": "1.72.0-SNAPSHOT",
"extensionKind": [
"workspace"
],
Expand Down Expand Up @@ -213,6 +213,12 @@
"items": {
"type": "string"
}
},
"amazonQ.proxy.certificateAuthority": {
"type": "string",
"markdownDescription": "%AWS.configuration.description.amazonq.proxy.certificateAuthority%",
"default": null,
"scope": "application"
}
}
},
Expand Down
6 changes: 4 additions & 2 deletions packages/amazonq/src/app/chat/activation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as vscode from 'vscode'
import { ExtensionContext } from 'vscode'
import { telemetry } from 'aws-core-vscode/telemetry'
import { AuthUtil } from 'aws-core-vscode/codewhisperer'
import { Commands, placeholder } from 'aws-core-vscode/shared'
import { Commands, getLogger, placeholder } from 'aws-core-vscode/shared'
import * as amazonq from 'aws-core-vscode/amazonq'

export async function activate(context: ExtensionContext) {
Expand Down Expand Up @@ -67,7 +67,9 @@ async function setupAuthNotification() {
const selection = await vscode.window.showWarningMessage('Start using Amazon Q', buttonAction)

if (selection === buttonAction) {
void amazonq.focusAmazonQPanel.execute(placeholder, source)
amazonq.focusAmazonQPanel.execute(placeholder, source).catch((e) => {
getLogger().error('focusAmazonQPanel failed: %s', e)
})
}
}
}
9 changes: 8 additions & 1 deletion packages/amazonq/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
Experiments,
isSageMaker,
isAmazonLinux2,
ProxyUtil,
} from 'aws-core-vscode/shared'
import { ExtStartUpSources } from 'aws-core-vscode/telemetry'
import { VSCODE_EXTENSION_ID } from 'aws-core-vscode/utils'
Expand Down Expand Up @@ -119,6 +120,10 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
const extContext = {
extensionContext: context,
}

// Configure proxy settings early
ProxyUtil.configureProxyForLanguageServer()

// This contains every lsp agnostic things (auth, security scan, code scan)
await activateCodeWhisperer(extContext as ExtContext)
if (
Expand Down Expand Up @@ -166,7 +171,9 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
// Give time for the extension to finish initializing.
globals.clock.setTimeout(async () => {
CommonAuthWebview.authSource = ExtStartUpSources.firstStartUp
void focusAmazonQPanel.execute(placeholder, ExtStartUpSources.firstStartUp)
focusAmazonQPanel.execute(placeholder, ExtStartUpSources.firstStartUp).catch((e) => {
getLogger().error('focusAmazonQPanel failed: %s', e)
})
}, 1000)
}

Expand Down
15 changes: 12 additions & 3 deletions packages/amazonq/src/lsp/activation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import vscode from 'vscode'
import { startLanguageServer } from './client'
import { AmazonQLspInstaller } from './lspInstaller'
import { lspSetupStage, ToolkitError, messages } from 'aws-core-vscode/shared'
import { AmazonQLspInstaller, getBundledResourcePaths } from './lspInstaller'
import { lspSetupStage, ToolkitError, messages, getLogger } from 'aws-core-vscode/shared'

export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
try {
Expand All @@ -16,6 +16,15 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
})
} catch (err) {
const e = err as ToolkitError
void messages.showViewLogsMessage(`Failed to launch Amazon Q language server: ${e.message}`)
getLogger('amazonqLsp').warn(`Failed to start downloaded LSP, falling back to bundled LSP: ${e.message}`)
try {
await lspSetupStage('all', async () => {
await lspSetupStage('launch', async () => await startLanguageServer(ctx, getBundledResourcePaths(ctx)))
})
} catch (error) {
void messages.showViewLogsMessage(
`Failed to launch Amazon Q language server: ${(error as ToolkitError).message}`
)
}
}
}
24 changes: 24 additions & 0 deletions packages/amazonq/src/lsp/chat/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ import {
CancellationTokenSource,
chatUpdateNotificationType,
ChatUpdateParams,
chatOptionsUpdateType,
ChatOptionsUpdateParams,
} from '@aws/language-server-runtimes/protocol'
import { v4 as uuidv4 } from 'uuid'
import * as vscode from 'vscode'
Expand Down Expand Up @@ -433,6 +435,21 @@ export function registerMessageListeners(
async (params: ShowDocumentParams): Promise<ShowDocumentParams | ResponseError<ShowDocumentResult>> => {
try {
const uri = vscode.Uri.parse(params.uri)

if (params.external) {
// Note: Not using openUrl() because we probably don't want telemetry for these URLs.
// Also it doesn't yet support the required HACK below.

// HACK: workaround vscode bug: https://github.com/microsoft/vscode/issues/85930
vscode.env.openExternal(params.uri as any).then(undefined, (e) => {
// TODO: getLogger('?').error('failed vscode.env.openExternal: %O', e)
vscode.env.openExternal(uri).then(undefined, (e) => {
// TODO: getLogger('?').error('failed vscode.env.openExternal: %O', e)
})
})
return params
}

const doc = await vscode.workspace.openTextDocument(uri)
await vscode.window.showTextDocument(doc, { preview: false })
return params
Expand Down Expand Up @@ -486,6 +503,13 @@ export function registerMessageListeners(
params: params,
})
})

languageClient.onNotification(chatOptionsUpdateType.method, (params: ChatOptionsUpdateParams) => {
void provider.webview?.postMessage({
command: chatOptionsUpdateType.method,
params: params,
})
})
}

function isServerEvent(command: string) {
Expand Down
10 changes: 7 additions & 3 deletions packages/amazonq/src/lsp/chat/webviewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
AmazonQPromptSettings,
LanguageServerResolver,
amazonqMark,
getLogger,
} from 'aws-core-vscode/shared'
import { AuthUtil, RegionProfile } from 'aws-core-vscode/codewhisperer'
import { featureConfig } from 'aws-core-vscode/amazonq'
Expand All @@ -44,9 +45,12 @@ export class AmazonQChatViewProvider implements WebviewViewProvider {
) {
const lspDir = Uri.file(LanguageServerResolver.defaultDir())
const dist = Uri.joinPath(globals.context.extensionUri, 'dist')

const resourcesRoots = [lspDir, dist]

const bundledResources = Uri.joinPath(globals.context.extensionUri, 'resources/language-server')
let resourcesRoots = [lspDir, dist]
if (this.mynahUIPath?.startsWith(globals.context.extensionUri.fsPath)) {
getLogger('amazonqLsp').info(`Using bundled webview resources ${bundledResources.fsPath}`)
resourcesRoots = [bundledResources, dist]
}
/**
* if the mynah chat client is defined, then make sure to add it to the resource roots, otherwise
* it will 401 when trying to load
Expand Down
11 changes: 11 additions & 0 deletions packages/amazonq/src/lsp/lspInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import vscode from 'vscode'
import { fs, getNodeExecutableName, getRgExecutableName, BaseLspInstaller, ResourcePaths } from 'aws-core-vscode/shared'
import path from 'path'
import { ExtendedAmazonQLSPConfig, getAmazonQLspConfig } from './config'
Expand Down Expand Up @@ -54,3 +55,13 @@ export class AmazonQLspInstaller extends BaseLspInstaller.BaseLspInstaller<

protected override downloadMessageOverride: string | undefined = 'Updating Amazon Q plugin'
}

export function getBundledResourcePaths(ctx: vscode.ExtensionContext): AmazonQResourcePaths {
const assetDirectory = vscode.Uri.joinPath(ctx.extensionUri, 'resources', 'language-server').fsPath
return {
lsp: path.join(assetDirectory, 'servers', 'aws-lsp-codewhisperer.js'),
node: process.execPath,
ripGrep: '',
ui: path.join(assetDirectory, 'clients', 'amazonq-ui.js'),
}
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@
"@aws-sdk/s3-request-presigner": "<3.731.0",
"@aws-sdk/smithy-client": "<3.731.0",
"@aws-sdk/util-arn-parser": "<3.731.0",
"@aws/mynah-ui": "^4.30.3",
"@aws/mynah-ui": "^4.34.1",
"@gerhobbelt/gitignore-parser": "^0.2.0-9",
"@iarna/toml": "^2.2.5",
"@smithy/fetch-http-handler": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"AWS.configuration.description.amazonq.workspaceIndexIgnoreFilePatterns": "File patterns to ignore when indexing your workspace files",
"AWS.configuration.description.amazonq.workspaceIndexCacheDirPath": "The path to the directory that contains the cache of the index of your workspace files",
"AWS.configuration.description.amazonq.ignoredSecurityIssues": "Specifies a list of code issue identifiers that Amazon Q should ignore when reviewing your workspace. Each item in the array should be a unique string identifier for a specific code issue. This allows you to suppress notifications for known issues that you've assessed and determined to be false positives or not applicable to your project. Use this setting with caution, as it may cause you to miss important security alerts.",
"AWS.command.apig.copyUrl": "Copy URL",
"AWS.configuration.description.amazonq.proxy.certificateAuthority": "Path to a Certificate Authority (PEM file) for SSL/TLS verification when using a proxy.",
"AWS.command.apig.invokeRemoteRestApi": "Invoke in the cloud",
"AWS.command.apig.invokeRemoteRestApi.cn": "Invoke on Amazon",
"AWS.appBuilder.explorerTitle": "Application Builder",
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/amazonq/auth/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { getLogger } from '../../shared/logger/logger'
import { reconnect } from '../../codewhisperer/commands/basicCommands'
import { amazonQChatSource } from '../../codewhisperer/commands/types'
import { focusAmazonQPanel } from '../../codewhispererChat/commands/registerCommands'
Expand All @@ -27,7 +28,9 @@ export class AuthController {
}

private handleFullAuth() {
void focusAmazonQPanel.execute(placeholder, 'amazonQChat')
focusAmazonQPanel.execute(placeholder, 'amazonQChat').catch((e) => {
getLogger().error('focusAmazonQPanel failed: %s', e)
})
}

private handleReAuth() {
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/amazonq/webview/ui/tabs/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ To learn more, visit the [User Guide](${userGuideURL}).`,
gumby: {
title: 'Q - Code Transformation',
placeholder: 'Open a new tab to chat with Q',
welcome: 'Welcome to Code Transformation!',
welcome:
'Welcome to Code Transformation! You can also run transformations from the command line. To install the tool, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/run-CLI-transformations.html).',
},
review: {
title: 'Q - Review',
Expand Down
9 changes: 7 additions & 2 deletions packages/core/src/codewhisperer/commands/basicCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ export const notifyNewCustomizationsCmd = Commands.declare(
function focusQAfterDelay() {
// this command won't work without a small delay after install
globals.clock.setTimeout(() => {
void focusAmazonQPanel.execute(placeholder, 'startDelay')
focusAmazonQPanel.execute(placeholder, 'startDelay').catch((e) => {
getLogger().error('focusAmazonQPanel failed: %s', e)
})
}, 1000)
}

Expand Down Expand Up @@ -597,7 +599,10 @@ export const signoutCodeWhisperer = Commands.declare(
(auth: AuthUtil) => async (_: VsCodeCommandArg, source: CodeWhispererSource) => {
await auth.secondaryAuth.deleteConnection()
SecurityIssueTreeViewProvider.instance.refresh()
return focusAmazonQPanel.execute(placeholder, source)
return focusAmazonQPanel.execute(placeholder, source).catch((e) => {
getLogger().error('focusAmazonQPanel failed: %s', e)
return undefined
})
}
)

Expand Down
Loading
Loading