Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
d4a1fa8
Merge remote-tracking branch 'upstream/master' into HEAD
opieter-aws Jun 9, 2025
8c5111a
Lintfix
opieter-aws Jun 9, 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
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
10 changes: 6 additions & 4 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
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"
}
4 changes: 4 additions & 0 deletions packages/amazonq/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.71.0 2025-06-04

- Miscellaneous non-user-facing changes

## 1.70.0 2025-05-28

- **Removal** Disable local workspace LSP
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.71.0-SNAPSHOT",
"version": "1.72.0-SNAPSHOT",
"extensionKind": [
"workspace"
],
Expand Down Expand Up @@ -212,6 +212,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)
})
}
}
}
10 changes: 8 additions & 2 deletions packages/amazonq/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
Experiments,
isSageMaker,
Commands,
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 @@ -127,7 +128,10 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
// Auth is dependent on LSP, needs to be activated before CW and Inline
await activateAmazonqLsp(context)

// This contains every lsp agnostic things (security scan, code scan)
// Configure proxy settings early
ProxyUtil.configureProxyForLanguageServer()

// This contains every lsp agnostic things (auth, security scan, code scan)
await activateCodeWhisperer(extContext as ExtContext)
if (!Experiments.instance.get('amazonqLSPInline', false)) {
await activateInlineCompletion()
Expand Down Expand Up @@ -170,7 +174,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) {
try {
Expand All @@ -16,6 +16,15 @@ export async function activate(ctx: vscode.ExtensionContext) {
})
} 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}`
)
}
}
}
9 changes: 9 additions & 0 deletions packages/amazonq/src/lsp/chat/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,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 @@ -451,6 +453,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
17 changes: 13 additions & 4 deletions packages/amazonq/src/lsp/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import {
getOptOutPreference,
isAmazonLinux2,
oidcClientName,
openUrl,
getClientId,
extensionVersion,
Commands,
Expand Down Expand Up @@ -151,7 +150,6 @@ export async function startLanguageServer(
awsClientCapabilities: {
q: {
developerProfiles: true,
mcp: true,
},
window: {
notifications: true,
Expand Down Expand Up @@ -305,9 +303,20 @@ async function postStartLanguageServer(
const uri = vscode.Uri.parse(params.uri)
getLogger().info(`Processing ShowDocumentRequest for URI scheme: ${uri.scheme}`)
try {
if (uri.scheme.startsWith('http')) {
if (params.external) {
getLogger().info('Opening URL...')
await openUrl(vscode.Uri.parse(params.uri))

// 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
} else {
getLogger().info('Opening text document...')
const doc = await vscode.workspace.openTextDocument(uri)
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.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 @@ -404,7 +404,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 @@ -596,7 +598,10 @@ export const signoutCodeWhisperer = Commands.declare(
() => async (_: VsCodeCommandArg, source: CodeWhispererSource) => {
await AuthUtil.instance.logout()
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
10 changes: 8 additions & 2 deletions packages/core/src/codewhisperer/ui/codeWhispererNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { submitFeedback } from '../../feedback/vue/submitFeedback'
import { focusAmazonQPanel } from '../../codewhispererChat/commands/registerCommands'
import { isWeb } from '../../shared/extensionGlobals'
import { builderIdRegion, builderIdStartUrl } from '../../auth/sso/constants'
import { getLogger } from '../../shared/logger/logger'

export function createAutoSuggestions(running: boolean): DataQuickPickItem<'autoSuggestions'> {
const labelResume = localize('AWS.codewhisperer.resumeCodeWhispererNode.label', 'Resume Auto-Suggestions')
Expand Down Expand Up @@ -239,7 +240,10 @@ export function switchToAmazonQNode(): DataQuickPickItem<'openChatPanel'> {
data: 'openChatPanel',
label: 'Open Chat Panel',
iconPath: getIcon('vscode-comment'),
onClick: () => focusAmazonQPanel.execute(placeholder, 'codewhispererQuickPick'),
onClick: () =>
focusAmazonQPanel.execute(placeholder, 'codewhispererQuickPick').catch((e) => {
getLogger().error('focusAmazonQPanel failed: %s', e)
}),
}
}

Expand All @@ -248,7 +252,9 @@ export function createSignIn(): DataQuickPickItem<'signIn'> {
const icon = getIcon('vscode-account')

let onClick = () => {
void focusAmazonQPanel.execute(placeholder, 'codewhispererQuickPick')
focusAmazonQPanel.execute(placeholder, 'codewhispererQuickPick').catch((e) => {
getLogger().error('focusAmazonQPanel failed: %s', e)
})
}
if (isWeb()) {
// TODO: nkomonen, call a Command instead
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export {
CodewhispererUserDecision,
CodewhispererSecurityScan,
} from './telemetry/telemetry.gen'
export { ProxyUtil } from './utilities/proxyUtil'
export { randomUUID } from './crypto'
export * from './environmentVariables'
export * from './vscode/setContext'
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/shared/logger/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type LogTopic =
| 'resourceCache'
| 'telemetry'
| 'amazonqAuth'
| 'proxyUtil'

class ErrorLog {
constructor(
Expand Down
Loading
Loading