Skip to content

Commit

Permalink
Merge pull request #6671 from aws/autoMerge/feature/amazonqLSP
Browse files Browse the repository at this point in the history
Merge master into feature/amazonqLSP
  • Loading branch information
justinmk3 authored Mar 11, 2025
2 parents ff1bbbd + 848fe0c commit b19d52b
Show file tree
Hide file tree
Showing 206 changed files with 12,641 additions and 8,222 deletions.
2 changes: 2 additions & 0 deletions buildspec/linuxE2ETests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ phases:
# - '>/dev/null apt-get -qq install -y ca-certificates'
# - 'apt-get install --reinstall ca-certificates'
- bash buildspec/shared/linux-install.sh
# increase file watcher count (ENOSPC error)
- sysctl fs.inotify.max_user_watches=524288

pre_build:
commands:
Expand Down
10,317 changes: 5,284 additions & 5,033 deletions package-lock.json

Large diffs are not rendered by default.

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.296",
"@aws-toolkits/telemetry": "^1.0.305",
"@playwright/browser-chromium": "^1.43.1",
"@stylistic/eslint-plugin": "^2.11.0",
"@types/he": "^1.2.3",
Expand Down
26 changes: 26 additions & 0 deletions packages/amazonq/.changes/1.49.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"date": "2025-02-27",
"version": "1.49.0",
"entries": [
{
"type": "Bug Fix",
"description": "Amazon Q /test: Unit test generation displays an inaccurate diff view for non-primary packages in the workspace."
},
{
"type": "Bug Fix",
"description": "Amazon Q /doc: Fix uploading file method throwing incorrect workspace too large error message"
},
{
"type": "Bug Fix",
"description": "/transform: skip running tests locally when user chooses to do so"
},
{
"type": "Bug Fix",
"description": "/review: ignored lines should not show up in scan issues"
},
{
"type": "Bug Fix",
"description": "/test: update capability card text"
}
]
}
34 changes: 34 additions & 0 deletions packages/amazonq/.changes/1.50.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"date": "2025-03-06",
"version": "1.50.0",
"entries": [
{
"type": "Bug Fix",
"description": "/doc: Usage in multiple chat tabs may cause unexpected behavior."
},
{
"type": "Bug Fix",
"description": "/review: subsequent reviews weren't possible"
},
{
"type": "Feature",
"description": "Amazon Q chat: Use `@` to add folders, files, and saved prompts as context"
},
{
"type": "Feature",
"description": "Amazon Q chat: increase chat input height to 3 lines"
},
{
"type": "Feature",
"description": "Amazon Q chat: Show list of files sent as context in chat response"
},
{
"type": "Feature",
"description": "Amazon Q chat: Add support for `.md` file rules in workspace-level `.amazonq/rules` directory"
},
{
"type": "Test",
"description": "add Q Chat /review command test coverage"
}
]
}

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": "Amazon Q Chat: You can now keep a \"library\" of prompt files in your home directory under `~/.aws/amazonq/prompts` and then quickly add them to the context using `@` on any project you’re working on. Prompt files are in markdown (`.md`) format."
}
18 changes: 18 additions & 0 deletions packages/amazonq/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 1.50.0 2025-03-06

- **Bug Fix** /doc: Usage in multiple chat tabs may cause unexpected behavior.
- **Bug Fix** /review: subsequent reviews weren't possible
- **Feature** Amazon Q chat: Use `@` to add folders, files, and saved prompts as context
- **Feature** Amazon Q chat: increase chat input height to 3 lines
- **Feature** Amazon Q chat: Show list of files sent as context in chat response
- **Feature** Amazon Q chat: Add support for `.md` file rules in workspace-level `.amazonq/rules` directory
- **Test** add Q Chat /review command test coverage

## 1.49.0 2025-02-27

- **Bug Fix** Amazon Q /test: Unit test generation displays an inaccurate diff view for non-primary packages in the workspace.
- **Bug Fix** Amazon Q /doc: Fix uploading file method throwing incorrect workspace too large error message
- **Bug Fix** /transform: skip running tests locally when user chooses to do so
- **Bug Fix** /review: ignored lines should not show up in scan issues
- **Bug Fix** /test: update capability card text

## 1.48.0 2025-02-20

- **Bug Fix** /dev and /doc: Multi-root workspace with duplicate files causes infinite 'Uploading code...' loop
Expand Down
2 changes: 1 addition & 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.49.0-SNAPSHOT",
"version": "1.51.0-SNAPSHOT",
"extensionKind": [
"workspace"
],
Expand Down
1 change: 1 addition & 0 deletions packages/amazonq/src/app/amazonqScan/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function init(appContext: AmazonQAppInitContext) {
authClicked: new vscode.EventEmitter<any>(),
tabOpened: new vscode.EventEmitter<any>(),
tabClosed: new vscode.EventEmitter<any>(),
runScan: new vscode.EventEmitter<any>(),
formActionClicked: new vscode.EventEmitter<any>(),
errorThrown: new vscode.EventEmitter<any>(),
showSecurityScan: new vscode.EventEmitter<any>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class ScanController {
this.authController = new AuthController()

this.chatControllerMessageListeners.tabOpened.event((data) => {
return this.tabOpened(data).then(() => this.scanInitiated(data))
return this.tabOpened(data)
})

this.chatControllerMessageListeners.tabClosed.event((data) => {
Expand All @@ -60,6 +60,10 @@ export class ScanController {
this.authClicked(data)
})

this.chatControllerMessageListeners.runScan.event((data) => {
return this.scanInitiated(data)
})

this.chatControllerMessageListeners.formActionClicked.event((data) => {
return this.formActionClicked(data)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export class UIMessageListener {
case 'auth-follow-up-was-clicked':
this.authClicked(msg)
break
case 'review':
this.scan(msg)
break
case 'form-action-click':
this.formActionClicked(msg)
break
Expand All @@ -58,6 +61,12 @@ export class UIMessageListener {
}
}

private scan(msg: UIMessage) {
this.scanControllerEventsEmitters?.runScan.fire({
tabID: msg.tabID,
})
}

private formActionClicked(msg: UIMessage) {
this.scanControllerEventsEmitters?.formActionClicked.fire({
...msg,
Expand Down
4 changes: 2 additions & 2 deletions packages/amazonq/test/e2e/amazonq/chat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { MynahUIDataModel } from '@aws/mynah-ui'
import { assertContextCommands, assertQuickActions } from './assert'
import { registerAuthHook, using } from 'aws-core-vscode/test'
import { loginToIdC } from './utils/setup'
import { webviewConstants } from 'aws-core-vscode/amazonq'
import { webviewConstants, webviewTabConstants } from 'aws-core-vscode/amazonq'

describe('Amazon Q Chat', function () {
let framework: qTestingFramework
Expand Down Expand Up @@ -60,7 +60,7 @@ describe('Amazon Q Chat', function () {
})

it('Shows placeholder', () => {
assert.deepStrictEqual(store.promptInputPlaceholder, 'Ask a question or enter "/" for quick actions')
assert.deepStrictEqual(store.promptInputPlaceholder, webviewTabConstants.commonTabData.placeholder)
})

it('Sends message', async () => {
Expand Down
3 changes: 3 additions & 0 deletions packages/amazonq/test/e2e/amazonq/framework/jsdomInjector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export function injectJSDOM() {
get() {
return this.textContent
},
set(value) {
this.textContent = value
},
})

// jsdom doesn't have support for structuredClone. See https://github.com/jsdom/jsdom/issues/3363
Expand Down
Loading

0 comments on commit b19d52b

Please sign in to comment.