Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3b7082a
telemetry(amazonq): /dev error classification #6772
neilk-aws Mar 18, 2025
9f2fde8
fix(amazonq): Improve responses for saved prompts, workspace rules #6805
avi-alpert Mar 18, 2025
6e367e9
build(deps): remove `@aws/fully-qualified-names` dependency #6807
justinmk3 Mar 18, 2025
070c36d
fix(inline-completion): potential inline completion failure due to in…
Will-ShaoHua Mar 19, 2025
8f77724
feat(amazonq): Add changelog item for enabling inline code suggestion…
jpinkney-aws Mar 19, 2025
cf83957
fix(amazonq): invalid version in language server cache causes crash (…
jpinkney-aws Mar 19, 2025
5ff53ba
refactor(workspaceutil): unify file collecting utilities (#6804)
Hweinstock Mar 19, 2025
bd37885
docs: add "Q Developer" marketplace tag (#6810)
hayemaxi Mar 19, 2025
8505d7b
/review: passing referenceTrackerConfiguration to StartCodeFixJob
atonaamz Mar 20, 2025
3fb8a9e
Merge branch 'aws:master' into master
atonaamz Mar 20, 2025
c7179db
fix(amazonq): Open multiple VSCode instances crashes Amazon Q Languag…
jpinkney-aws Mar 20, 2025
417370f
Merge pull request #6821 from atonaamz/master
atonaamz Mar 20, 2025
349b9c9
Release 3.51.0
Mar 20, 2025
ac0b29e
Release 1.52.0
Mar 20, 2025
eb29451
Update version to snapshot version: 3.52.0-SNAPSHOT
Mar 20, 2025
6e26b33
Update version to snapshot version: 1.53.0-SNAPSHOT
Mar 20, 2025
b7ce8b4
Merge release into master
Mar 20, 2025
119d2f4
feat(amazonq): re-add basic chat through a language server (#6781)
jpinkney-aws Mar 20, 2025
e7b7307
telemetry(webview): Emit toolkit_X module telemetry on auth webview (…
nkomonen-amazon Mar 21, 2025
f0988b2
fix(amazonq): align inline completion document selectors (#6827)
jpinkney-aws Mar 21, 2025
db491de
refactor(apprunner): migrate to sdkv3. (#6764)
Hweinstock Mar 21, 2025
a814eac
Merge remote-tracking branch 'origin/master' into HEAD
jpinkney-aws Mar 21, 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
593 changes: 507 additions & 86 deletions package-lock.json

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions packages/amazonq/.changes/1.52.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"date": "2025-03-20",
"version": "1.52.0",
"entries": [
{
"type": "Bug Fix",
"description": "Amazon Q chat: @Folders and @Files are missing `@` prefix in chat history"
},
{
"type": "Bug Fix",
"description": "/review: Code Issues ellipses menu displays AWS Toolkit options, if installed."
},
{
"type": "Bug Fix",
"description": "Amazon Q chat: Progress indicator height is stretched"
},
{
"type": "Bug Fix",
"description": "Amazon Q chat: Long descriptions in context list are cut off"
},
{
"type": "Bug Fix",
"description": "Amazon Q chat: Improve responses for saved prompts and workspace rules"
},
{
"type": "Bug Fix",
"description": "/test: show descriptive error message"
},
{
"type": "Bug Fix",
"description": "Code Review: Fixed a bug where issues are double counted in the Q chat"
},
{
"type": "Bug Fix",
"description": "Amazon Q chat: Animation timings are too long"
},
{
"type": "Bug Fix",
"description": "Fix inline completion failure due to context length exceeding the threshold"
},
{
"type": "Feature",
"description": "/review: passing referenceTrackerConfiguration to StartCodeFixJob"
},
{
"type": "Feature",
"description": "/review: rename setting `showInlineCodeSuggestionsWithCodeReferences` to `showCodeWithReferences`"
}
]
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Feature",
"description": "(Experimental) Amazon Q inline code suggestions via Amazon Q Language Server. (enable with `aws.experiments.amazonqLSP: true`)"
}

This file was deleted.

14 changes: 14 additions & 0 deletions packages/amazonq/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 1.52.0 2025-03-20

- **Bug Fix** Amazon Q chat: @Folders and @Files are missing `@` prefix in chat history
- **Bug Fix** /review: Code Issues ellipses menu displays AWS Toolkit options, if installed.
- **Bug Fix** Amazon Q chat: Progress indicator height is stretched
- **Bug Fix** Amazon Q chat: Long descriptions in context list are cut off
- **Bug Fix** Amazon Q chat: Improve responses for saved prompts and workspace rules
- **Bug Fix** /test: show descriptive error message
- **Bug Fix** Code Review: Fixed a bug where issues are double counted in the Q chat
- **Bug Fix** Amazon Q chat: Animation timings are too long
- **Bug Fix** Fix inline completion failure due to context length exceeding the threshold
- **Feature** /review: passing referenceTrackerConfiguration to StartCodeFixJob
- **Feature** /review: rename setting `showInlineCodeSuggestionsWithCodeReferences` to `showCodeWithReferences`

## 1.51.0 2025-03-12

- **Bug Fix** increase scan timeout to reduce front-end timeout errors
Expand Down
5 changes: 3 additions & 2 deletions 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.52.0-SNAPSHOT",
"version": "1.53.0-SNAPSHOT",
"extensionKind": [
"workspace"
],
Expand Down Expand Up @@ -32,7 +32,8 @@
"Codewhisperer",
"AI",
"Assistant",
"Chatbot"
"Chatbot",
"Q Developer"
],
"preview": false,
"qna": "https://github.com/aws/aws-toolkit-vscode/issues",
Expand Down
11 changes: 0 additions & 11 deletions packages/amazonq/scripts/build/copyFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,6 @@ const tasks: CopyTask[] = [
destination: 'vue/',
},

// Mynah
{
target: path.join(
'../../node_modules',
'@aws',
'fully-qualified-names',
'node',
'aws_fully_qualified_names_bg.wasm'
),
destination: path.join('src', 'aws_fully_qualified_names_bg.wasm'),
},
{
target: path.join('../../node_modules', 'web-tree-sitter', 'tree-sitter.wasm'),
destination: path.join('src', 'tree-sitter.wasm'),
Expand Down
33 changes: 2 additions & 31 deletions packages/amazonq/src/app/inline/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,11 @@ import {
logInlineCompletionSessionResultsNotificationType,
LogInlineCompletionSessionResultsParams,
} from '@aws/language-server-runtimes/protocol'

export const CodewhispererInlineCompletionLanguages = [
{ scheme: 'file', language: 'typescript' },
{ scheme: 'file', language: 'javascript' },
{ scheme: 'file', language: 'json' },
{ scheme: 'file', language: 'yaml' },
{ scheme: 'file', language: 'java' },
{ scheme: 'file', language: 'go' },
{ scheme: 'file', language: 'php' },
{ scheme: 'file', language: 'rust' },
{ scheme: 'file', language: 'kotlin' },
{ scheme: 'file', language: 'terraform' },
{ scheme: 'file', language: 'ruby' },
{ scheme: 'file', language: 'shellscript' },
{ scheme: 'file', language: 'dart' },
{ scheme: 'file', language: 'lua' },
{ scheme: 'file', language: 'powershell' },
{ scheme: 'file', language: 'r' },
{ scheme: 'file', language: 'swift' },
{ scheme: 'file', language: 'systemverilog' },
{ scheme: 'file', language: 'scala' },
{ scheme: 'file', language: 'vue' },
{ scheme: 'file', language: 'csharp' },
{ scheme: 'file', language: 'python' },
{ scheme: 'file', language: 'c' },
{ scheme: 'file', language: 'cpp' },
{ scheme: 'file', language: 'sql' },
{ scheme: 'file', language: 'tsx' },
{ scheme: 'file', language: 'jsx' },
]
import { CodeWhispererConstants } from 'aws-core-vscode/codewhisperer'

export function registerInlineCompletion(languageClient: LanguageClient) {
const inlineCompletionProvider = new AmazonQInlineCompletionItemProvider(languageClient)
languages.registerInlineCompletionItemProvider(CodewhispererInlineCompletionLanguages, inlineCompletionProvider)
languages.registerInlineCompletionItemProvider(CodeWhispererConstants.platformLanguageIds, inlineCompletionProvider)

const onInlineAcceptance = async (
sessionId: string,
Expand Down
2 changes: 1 addition & 1 deletion packages/amazonq/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is

context.subscriptions.push(
Experiments.instance.onDidChange(async (event) => {
if (event.key === 'amazonqLSP') {
if (event.key === 'amazonqLSP' || event.key === 'amazonqChatLSP') {
await vscode.window
.showInformationMessage(
'Amazon Q LSP setting has changed. Reload VS Code for the changes to take effect.',
Expand Down
16 changes: 13 additions & 3 deletions packages/amazonq/src/extensionNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ import * as vscode from 'vscode'
import { activateAmazonQCommon, amazonQContextPrefix, deactivateCommon } from './extension'
import { DefaultAmazonQAppInitContext } from 'aws-core-vscode/amazonq'
import { activate as activateQGumby } from 'aws-core-vscode/amazonqGumby'
import { ExtContext, globals, CrashMonitoring, getLogger, isNetworkError, isSageMaker } from 'aws-core-vscode/shared'
import {
ExtContext,
globals,
CrashMonitoring,
getLogger,
isNetworkError,
isSageMaker,
Experiments,
} from 'aws-core-vscode/shared'
import { filetypes, SchemaService } from 'aws-core-vscode/sharedNode'
import { updateDevMode } from 'aws-core-vscode/dev'
import { CommonAuthViewProvider } from 'aws-core-vscode/login'
Expand Down Expand Up @@ -43,8 +51,10 @@ async function activateAmazonQNode(context: vscode.ExtensionContext) {
extensionContext: context,
}

await activateCWChat(context)
await activateQGumby(extContext as ExtContext)
if (!Experiments.instance.get('amazonqChatLSP', false)) {
await activateCWChat(context)
await activateQGumby(extContext as ExtContext)
}

const authProvider = new CommonAuthViewProvider(
context,
Expand Down
34 changes: 34 additions & 0 deletions packages/amazonq/src/lsp/chat/activation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*!
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

import { window } from 'vscode'
import { LanguageClient } from 'vscode-languageclient'
import { AmazonQChatViewProvider } from './webviewProvider'
import { registerCommands } from './commands'
import { registerLanguageServerEventListener, registerMessageListeners } from './messages'
import { globals } from 'aws-core-vscode/shared'

export function activate(languageClient: LanguageClient, encryptionKey: Buffer, mynahUIPath: string) {
const provider = new AmazonQChatViewProvider(mynahUIPath)

globals.context.subscriptions.push(
window.registerWebviewViewProvider(AmazonQChatViewProvider.viewType, provider, {
webviewOptions: {
retainContextWhenHidden: true,
},
})
)

/**
* Commands are registered independent of the webview being open because when they're executed
* they focus the webview
**/
registerCommands(provider)
registerLanguageServerEventListener(languageClient, provider)

provider.onDidResolveWebview(() => {
registerMessageListeners(languageClient, provider, encryptionKey)
})
}
79 changes: 79 additions & 0 deletions packages/amazonq/src/lsp/chat/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*!
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

import * as vscode from 'vscode'
import { Commands, globals } from 'aws-core-vscode/shared'
import { window } from 'vscode'
import { AmazonQChatViewProvider } from './webviewProvider'

export function registerCommands(provider: AmazonQChatViewProvider) {
globals.context.subscriptions.push(
registerGenericCommand('aws.amazonq.explainCode', 'Explain', provider),
registerGenericCommand('aws.amazonq.refactorCode', 'Refactor', provider),
registerGenericCommand('aws.amazonq.fixCode', 'Fix', provider),
registerGenericCommand('aws.amazonq.optimizeCode', 'Optimize', provider),
Commands.register('aws.amazonq.sendToPrompt', (data) => {
const triggerType = getCommandTriggerType(data)
const selection = getSelectedText()

void focusAmazonQPanel().then(() => {
void provider.webview?.postMessage({
command: 'sendToPrompt',
params: { selection: selection, triggerType },
})
})
}),
Commands.register('aws.amazonq.openTab', () => {
void focusAmazonQPanel().then(() => {
void provider.webview?.postMessage({
command: 'aws/chat/openTab',
params: {},
})
})
})
)
}

function getSelectedText(): string {
const editor = window.activeTextEditor
if (editor) {
const selection = editor.selection
const selectedText = editor.document.getText(selection)
return selectedText
}

return ' '
}

function getCommandTriggerType(data: any): string {
// data is undefined when commands triggered from keybinding or command palette. Currently no
// way to differentiate keybinding and command palette, so both interactions are recorded as keybinding
return data === undefined ? 'hotkeys' : 'contextMenu'
}

function registerGenericCommand(commandName: string, genericCommand: string, provider: AmazonQChatViewProvider) {
return Commands.register(commandName, (data) => {
const triggerType = getCommandTriggerType(data)
const selection = getSelectedText()

void focusAmazonQPanel().then(() => {
void provider.webview?.postMessage({
command: 'genericCommand',
params: { genericCommand, selection, triggerType },
})
})
})
}

/**
* Importing focusAmazonQPanel from aws-core-vscode/amazonq leads to several dependencies down the chain not resolving since AmazonQ chat
* is currently only activated on node, but the language server is activated on both web and node.
*
* Instead, we just create our own as a temporary solution
*/
async function focusAmazonQPanel() {
await vscode.commands.executeCommand('aws.amazonq.AmazonQChatView.focus')
await vscode.commands.executeCommand('aws.amazonq.AmazonCommonAuth.focus')
}
Loading
Loading