Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9f24127
add dummy command
Hweinstock Jan 7, 2025
2d31675
convert tracker to singleton class
Hweinstock Jan 7, 2025
ee81478
log all usage at info level
Hweinstock Jan 7, 2025
6385594
switch command name
Hweinstock Jan 7, 2025
b3d1fd4
add testing
Hweinstock Jan 7, 2025
be8fffb
refactor tests to avoid mocking when not necessary
Hweinstock Jan 7, 2025
6572e6b
add changelog
Hweinstock Jan 7, 2025
31fd2b9
add tests for telemetry
Hweinstock Jan 7, 2025
c0bc44e
implement telemetry for exceeding thresholds
Hweinstock Jan 8, 2025
fee1fcb
merge in telemetry changes
Hweinstock Jan 8, 2025
1286ee2
add process as str to telemetry
Hweinstock Jan 8, 2025
e25df1b
remove explicit adding now that tracker is singleton
Hweinstock Jan 8, 2025
5090323
add a safety clear before tests run
Hweinstock Jan 8, 2025
7685707
regroup tests
Hweinstock Jan 8, 2025
b66b01a
add message after accept/reject action
chungjac Jan 13, 2025
e5d4538
message now only in endSession
chungjac Jan 14, 2025
2e424b3
test(amazonq): Add e2e tests for general amazon q chat panel (#6279)
jpinkney-aws Jan 15, 2025
d862a21
fix(sso): login with custom startUrl not allowed (#6368)
nkomonen-amazon Jan 15, 2025
12256f7
Merge pull request #6365 from chungjac/test-gen-completed-message
ashishrp-aws Jan 15, 2025
73c0926
fix(amazonq): unsupported languages test generation query (#6363)
ashishrp-aws Jan 15, 2025
e7341f2
Release 1.43.0
Jan 15, 2025
b9a2471
Release 3.42.0
Jan 15, 2025
8bed9a6
Update version to snapshot version: 1.44.0-SNAPSHOT
Jan 16, 2025
7da291a
Update version to snapshot version: 3.43.0-SNAPSHOT
Jan 16, 2025
86cd492
Merge release into master
Jan 16, 2025
f805f9b
telemetry(amazonq): calculate % of non-generated (user-written) code …
leigaol Jan 16, 2025
c293290
fix(amazonq): improve settings description #6382
leigaol Jan 16, 2025
62ef0e5
feat(amazonq): change active file context limit to 40k #6371
andrewyuq Jan 16, 2025
f53ca21
test(amazonq): messages at different remaining iteration counts #6381
siakmun-aws Jan 17, 2025
fae084b
telemetry(amazonq): unit test generation #6386
ashishrp-aws Jan 17, 2025
9617649
fix(lambda): AppBuilder messages #6362
seshubaws Jan 17, 2025
4b47b04
fix(amazonq): setMaven correctly #6384
dhasani23 Jan 17, 2025
062d24a
feat(amazonq): grouping options for code issues #6330
ctlai95 Jan 17, 2025
d55b8e1
perf(childprocess): track/monitor health of spawned processes #6304
Hweinstock Jan 17, 2025
49fb090
refactor(core): Make HttpResourceFetcher platform agnostic (#6379)
jpinkney-aws Jan 17, 2025
373bbfa
refactor(core): Improve httpResourceFetcher API
jpinkney-aws Jan 17, 2025
f727e0e
refactor(core): Remove composite resource fetcher
jpinkney-aws Jan 17, 2025
2bbc46a
revert(amazonq): defaultServiceConfig endpoint change #6392
avi-alpert Jan 17, 2025
16c0228
deps(amazonq): bump mynahui to 4.21.5 #6393
Jurredr Jan 17, 2025
36c8d68
merge in upstream changes
Hweinstock Jan 17, 2025
dcd48d6
merge in upstream again
Hweinstock Jan 17, 2025
7622e5c
add units to process stat keys
Hweinstock Jan 17, 2025
bf515e0
resolve circ dep
Hweinstock Jan 17, 2025
045f9f0
fix failing tests
Hweinstock Jan 17, 2025
5a97c89
Merge pull request #6390 from jpinkney-aws/fetcher
jpinkney-aws Jan 17, 2025
30dd7d4
rename commands and remove outdated changelog
Hweinstock Jan 17, 2025
73b4210
update changelog
Hweinstock Jan 17, 2025
0762cb7
update telemetry
Hweinstock Jan 17, 2025
628a9d3
make it clear it is currently being logged
Hweinstock Jan 17, 2025
a427db9
Merge branch 'origin-master' into process/command
Hweinstock Jan 17, 2025
b329ede
update changelog to match
Hweinstock Jan 17, 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
21 changes: 11 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 @@ -40,7 +40,7 @@
"mergeReports": "ts-node ./scripts/mergeReports.ts"
},
"devDependencies": {
"@aws-toolkits/telemetry": "^1.0.289",
"@aws-toolkits/telemetry": "^1.0.293",
"@playwright/browser-chromium": "^1.43.1",
"@stylistic/eslint-plugin": "^2.11.0",
"@types/he": "^1.2.3",
Expand Down
42 changes: 42 additions & 0 deletions packages/amazonq/.changes/1.43.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"date": "2025-01-15",
"version": "1.43.0",
"entries": [
{
"type": "Bug Fix",
"description": "Auth: Valid StartURL not accepted at login"
},
{
"type": "Bug Fix",
"description": "Fix inline completion supplementalContext length exceeding maximum in certain cases"
},
{
"type": "Bug Fix",
"description": "Amazon Q /test: Unit test generation completed message shows after accept/reject action"
},
{
"type": "Bug Fix",
"description": "/test: for unsupported languages was sometimes unreliable"
},
{
"type": "Bug Fix",
"description": "User-selected customizations are sometimes not being persisted."
},
{
"type": "Bug Fix",
"description": "Amazon q /dev: Remove hard-coded limits and instead rely server-side data to communicate number of code generations remaining"
},
{
"type": "Feature",
"description": "Adds capability to send new context commands to AB groups"
},
{
"type": "Feature",
"description": "feat(amazonq): Add error message for updated README too large"
},
{
"type": "Feature",
"description": "Enhance Q inline completion context fetching for better suggestion quality"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "Amazon Q: word duplication when pressing tab on context selector fixed"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "Amazon Q: cursor no longer jumps after navigating prompt history"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "Improve the text description of workspace index settings"
}

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": "New command \"Log Extension Stats\" to see some runtime performance stats."
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Feature",
"description": "Amazon Q: increase chat current active file context char limit to 40k"
}

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": "/review: Code issues can be grouped by file location or severity"
}
12 changes: 12 additions & 0 deletions packages/amazonq/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 1.43.0 2025-01-15

- **Bug Fix** Auth: Valid StartURL not accepted at login
- **Bug Fix** Fix inline completion supplementalContext length exceeding maximum in certain cases
- **Bug Fix** Amazon Q /test: Unit test generation completed message shows after accept/reject action
- **Bug Fix** /test: for unsupported languages was sometimes unreliable
- **Bug Fix** User-selected customizations are sometimes not being persisted.
- **Bug Fix** Amazon q /dev: Remove hard-coded limits and instead rely server-side data to communicate number of code generations remaining
- **Feature** Adds capability to send new context commands to AB groups
- **Feature** feat(amazonq): Add error message for updated README too large
- **Feature** Enhance Q inline completion context fetching for better suggestion quality

## 1.42.0 2025-01-09

- **Bug Fix** Amazon Q /doc: Improve button text phrasing
Expand Down
20 changes: 18 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.43.0-SNAPSHOT",
"version": "1.44.0-SNAPSHOT",
"extensionKind": [
"workspace"
],
Expand Down Expand Up @@ -365,10 +365,15 @@
"when": "view == aws.AmazonQChatView || view == aws.amazonq.AmazonCommonAuth",
"group": "y_toolkitMeta@2"
},
{
"command": "aws.amazonq.codescan.showGroupingStrategy",
"when": "view == aws.amazonq.SecurityIssuesTree",
"group": "navigation@1"
},
{
"command": "aws.amazonq.security.showFilters",
"when": "view == aws.amazonq.SecurityIssuesTree",
"group": "navigation"
"group": "navigation@2"
}
],
"view/item/context": [
Expand Down Expand Up @@ -590,6 +595,11 @@
"title": "%AWS.command.viewLogs%",
"category": "%AWS.amazonq.title%"
},
{
"command": "aws.amazonq.showExtStats",
"title": "%AWS.command.showExtStats%",
"category": "%AWS.title%"
},
{
"command": "aws.amazonq.github",
"title": "%AWS.command.github%",
Expand Down Expand Up @@ -724,6 +734,12 @@
{
"command": "aws.amazonq.security.showFilters",
"title": "%AWS.command.amazonq.filterIssues%",
"icon": "$(filter)",
"enablement": "view == aws.amazonq.SecurityIssuesTree"
},
{
"command": "aws.amazonq.codescan.showGroupingStrategy",
"title": "%AWS.command.amazonq.groupIssues%",
"icon": "$(list-filter)",
"enablement": "view == aws.amazonq.SecurityIssuesTree"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { computeDecorations } from '../decorations/computeDecorations'
import { CodelensProvider } from '../codeLenses/codeLenseProvider'
import { PromptMessage, ReferenceLogController } from 'aws-core-vscode/codewhispererChat'
import { CodeWhispererSettings } from 'aws-core-vscode/codewhisperer'
import { UserWrittenCodeTracker } from 'aws-core-vscode/codewhisperer'
import {
codicon,
getIcon,
Expand Down Expand Up @@ -84,6 +85,7 @@ export class InlineChatController {
await this.updateTaskAndLenses(task)
this.referenceLogController.addReferenceLog(task.codeReferences, task.replacement ? task.replacement : '')
await this.reset()
UserWrittenCodeTracker.instance.onQFinishesEdits()
}

public async rejectAllChanges(task = this.task, userInvoked: boolean): Promise<void> {
Expand Down Expand Up @@ -199,7 +201,7 @@ export class InlineChatController {
getLogger().info('inlineQuickPick query is empty')
return
}

UserWrittenCodeTracker.instance.onQStartsMakingEdits()
this.userQuery = query
await textDocumentUtil.addEofNewline(editor)
this.task = await this.createTask(query, editor.document, editor.selection)
Expand Down
11 changes: 11 additions & 0 deletions packages/amazonq/test/e2e/amazonq/assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,14 @@ export function assertQuickActions(tab: Messenger, commands: string[]) {
assert.fail(`Could not find commands: ${missingCommands.join(', ')} for ${tab.tabID}`)
}
}

export function assertContextCommands(tab: Messenger, contextCommands: string[]) {
assert.deepStrictEqual(
tab
.getStore()
.contextCommands?.map((x) => x.commands)
.flat()
.map((x) => x.command),
contextCommands
)
}
85 changes: 85 additions & 0 deletions packages/amazonq/test/e2e/amazonq/chat.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*!
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

import assert from 'assert'
import { qTestingFramework } from './framework/framework'
import sinon from 'sinon'
import { Messenger } from './framework/messenger'
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'

describe('Amazon Q Chat', function () {
let framework: qTestingFramework
let tab: Messenger
let store: MynahUIDataModel

const availableCommands: string[] = ['/dev', '/test', '/review', '/doc', '/transform']

before(async function () {
/**
* Login to the amazonq-test-account. When running in CI this has unlimited
* calls to the backend api
*/
await using(registerAuthHook('amazonq-test-account'), async () => {
await loginToIdC()
})
})

// jscpd:ignore-start
beforeEach(() => {
// Make sure you're logged in before every test
registerAuthHook('amazonq-test-account')
framework = new qTestingFramework('cwc', true, [])
tab = framework.createTab()
store = tab.getStore()
})

afterEach(() => {
framework.removeTab(tab.tabID)
framework.dispose()
sinon.restore()
})

it(`Shows quick actions: ${availableCommands.join(', ')}`, async () => {
assertQuickActions(tab, availableCommands)
})

it('Shows @workspace', () => {
assertContextCommands(tab, ['@workspace'])
})

// jscpd:ignore-end

it('Shows title', () => {
assert.deepStrictEqual(store.tabTitle, 'Chat')
})

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

it('Sends message', async () => {
tab.addChatMessage({
prompt: 'What is a lambda',
})
await tab.waitForChatFinishesLoading()
const chatItems = tab.getChatItems()
// the last item should be an answer
assert.deepStrictEqual(chatItems[4].type, 'answer')
})

describe('Clicks examples', () => {
it('Click help', async () => {
tab.clickButton('help')
await tab.waitForText(webviewConstants.helpMessage)
const chatItems = tab.getChatItems()
assert.deepStrictEqual(chatItems[4].type, 'answer')
assert.deepStrictEqual(chatItems[4].body, webviewConstants.helpMessage)
})
})
})
2 changes: 1 addition & 1 deletion packages/amazonq/test/e2e/amazonq/framework/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class qTestingFramework {
featureName: TabType,
amazonQEnabled: boolean,
featureConfigsSerialized: [string, FeatureContext][],
welcomeCount = 0
welcomeCount = Number.MAX_VALUE // by default don't show the welcome page
) {
/**
* Instantiate the UI and override the postMessage to publish using the app message
Expand Down
Loading