Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2e9e559
eslint: fix EOL rule for windows
mvcninja Aug 15, 2024
26c83ee
update package-lock.json
jpinkney-aws Oct 16, 2024
7d73e91
rebase
jpinkney-aws Oct 16, 2024
5b325d4
Added ability to poll the changes
Nov 17, 2024
bbe560a
Fix polling mechanism for DocDB explorer
Nov 29, 2024
b03ce85
Merge branch 'master' into muaydin/docdb-polling-bug-fix
Dec 3, 2024
3d41ed8
update package-lock.json
Dec 4, 2024
a94fdd5
Merge branch 'master' into muaydin/docdb-polling-bug-fix
Dec 5, 2024
174b92b
feat(docdb): add 'override' to [inspect.custom] method in cluster and…
Dec 6, 2024
e4876e3
test(docdb): add unit tests for dbClusterNode in dbClusterNode.test.ts
Dec 6, 2024
0d043ce
fix(tests): properly mock DocumentDBClient to satisfy TypeScript requ…
Dec 6, 2024
6c40a13
fix(docdb): handle missing clusters gracefully in getStatus method
Dec 6, 2024
5b8a309
fix(tests): mock parentNode with a refresh method to prevent TypeErro…
Dec 6, 2024
1dd2695
fix(docdb): Update dbInstanceNode on UI when status changed
Jan 3, 2025
3ef2673
Merge branch 'master' into muaydin/docdb-polling-bug-fix
Jan 7, 2025
b165a7b
Merge branch 'master' into muaydin/docdb-polling-bug-fix
Jan 7, 2025
54a6746
fix(docdb): resolve ESLint issues in DocDB files
Jan 9, 2025
e9f5204
refactor(test): remove unclear assertion for esult.lines in zip gene…
Jan 9, 2025
1f03083
chore (docdb): reduce log verbosity by changing some info logs to debug
Jan 9, 2025
b02a22d
Merge branch 'master' into muaydin/docdb-polling-bug-fix
Jan 9, 2025
50fc468
fix(cleanup) Remove XML declaration line from .iml files
Jan 10, 2025
0cfd826
fix(docdb): fix jscpd errors
Jan 10, 2025
86d4469
fix(eslint) Revert eslint changes
Jan 10, 2025
7dd093b
fix(docdb) Fix package-lock changes
Jan 10, 2025
18a371b
Remove .iml files under textFixture directory
Jan 10, 2025
58bf5bf
Merge branch 'master' into muaydin/docdb-polling-bug-fix
Jan 10, 2025
4ad1655
fix(test) Revert zipUtil test changes
Jan 10, 2025
2dc2363
fix(wizard) Revert fix wizard bug related changes
Jan 10, 2025
410d38e
Merge branch 'master' into muaydin/docdb-polling-bug-fix
Jan 14, 2025
e1413a9
fix(amazonq): Fix LSP start failure in al2023 arm64 (#6488)
leigaol Feb 4, 2025
ef9abfc
feat(toolkit): Enhance autocomplete for variable and JSONata expressi…
silviac98 Feb 4, 2025
e3e8fcd
feat(amazonq): Add description and github issue link to feedback form…
dogusata Feb 4, 2025
5277848
perf(amazonq): Revert backoff and retry for /test APIs (#6461) (#6496)
laileni-aws Feb 4, 2025
9afc587
telemetry(amazonq): add doc generation V2 telemetry (#6427)
KevinDing1 Feb 4, 2025
50c9121
feat(amazonq): pre-fetch next recommendations for inline completions …
zixlin7 Feb 4, 2025
d8b3673
Merge branch 'master' into muaydin/docdb-polling-bug-fix
alexey-temnikov Feb 4, 2025
60a5da4
pollingSet method - `start` has been removed, adjusted code to use pr…
Feb 5, 2025
874eb41
Merge remote-tracking branch 'origin/muaydin/docdb-polling-bug-fix' i…
Feb 5, 2025
0cc411a
Merge pull request #6153 from Bit-Quill/muaydin/docdb-polling-bug-fix
jpinkney-aws Feb 5, 2025
69db397
fix(amazonq): auto-review doesn't populate treeview (#6502)
ctlai95 Feb 5, 2025
100eb07
telemetry(auth): debounce `aws_loadCredentials` and add debugging inf…
Hweinstock Feb 5, 2025
af77b1f
test(amazonq): skip flaky /test tests #6497
chungjac Feb 5, 2025
64b040b
Release 3.45.0
Feb 5, 2025
5174198
Release 1.46.0
Feb 5, 2025
9dffe3e
Update version to snapshot version: 3.46.0-SNAPSHOT
Feb 6, 2025
633b05b
telemetry(lsp): Integrate language server/manifest resolver telemetry…
Hweinstock Feb 6, 2025
2b345c9
Update version to snapshot version: 1.47.0-SNAPSHOT
Feb 6, 2025
ed87f5f
Merge release into master
Feb 6, 2025
610dd18
fix(amazonq): debugging amazon q can crash vscode (#6514)
jpinkney-aws Feb 6, 2025
fb5bace
fix(lint): Remove extra space (#6517)
witness-me Feb 6, 2025
02d21a2
fix(appbuilder): Update support for enVar in the webview (#6413)
jonife Feb 6, 2025
34dc101
fix(amazonq): log full error (#6422)
dhasani23 Feb 6, 2025
928593c
refactor(debounce): avoid reimplementations of the same logic. (#6507)
Hweinstock Feb 7, 2025
e8c7c07
Merge remote-tracking branch 'origin/master' into HEAD
jpinkney-aws Feb 7, 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,210 changes: 3,938 additions & 1,272 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 @@ -40,7 +40,7 @@
"mergeReports": "ts-node ./scripts/mergeReports.ts"
},
"devDependencies": {
"@aws-toolkits/telemetry": "^1.0.295",
"@aws-toolkits/telemetry": "^1.0.296",
"@playwright/browser-chromium": "^1.43.1",
"@stylistic/eslint-plugin": "^2.11.0",
"@types/he": "^1.2.3",
Expand Down
38 changes: 38 additions & 0 deletions packages/amazonq/.changes/1.46.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"date": "2025-02-05",
"version": "1.46.0",
"entries": [
{
"type": "Bug Fix",
"description": "Citation links are not clickable as numbers, but appear as non-clickable texts"
},
{
"type": "Bug Fix",
"description": "Fix language server start failure in AL2023 ARM64"
},
{
"type": "Bug Fix",
"description": "/review: Auto-review issues did not populate code issues list"
},
{
"type": "Bug Fix",
"description": "Amazon Q: Fix code upload error when using /dev or /doc on Remote SSH"
},
{
"type": "Bug Fix",
"description": "/test placeholder text aligned across IDEs"
},
{
"type": "Bug Fix",
"description": "Inline: Typos in the first example suggestion"
},
{
"type": "Feature",
"description": "Inline suggestions: Pre-fetch recommendations to reduce suggestion latency."
},
{
"type": "Feature",
"description": "Added github issue link and description to the chat answer feedback form"
}
]
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions packages/amazonq/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"debugWebviews": true,
"rendererDebugOptions": {
"urlFilter": "*amazonwebservices.amazon-q-vscode*",
"webRoot": "${workspaceFolder}"
},
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"env": {
Expand Down
11 changes: 11 additions & 0 deletions packages/amazonq/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 1.46.0 2025-02-05

- **Bug Fix** Citation links are not clickable as numbers, but appear as non-clickable texts
- **Bug Fix** Fix language server start failure in AL2023 ARM64
- **Bug Fix** /review: Auto-review issues did not populate code issues list
- **Bug Fix** Amazon Q: Fix code upload error when using /dev or /doc on Remote SSH
- **Bug Fix** /test placeholder text aligned across IDEs
- **Bug Fix** Inline: Typos in the first example suggestion
- **Feature** Inline suggestions: Pre-fetch recommendations to reduce suggestion latency.
- **Feature** Added github issue link and description to the chat answer feedback form

## 1.45.0 2025-01-30

- **Bug Fix** Allow AB users with an overridden customization to go back to the default customization
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.46.0-SNAPSHOT",
"version": "1.47.0-SNAPSHOT",
"extensionKind": [
"workspace"
],
Expand Down
8 changes: 5 additions & 3 deletions packages/amazonq/src/lsp/activation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
import vscode from 'vscode'
import { startLanguageServer } from './client'
import { AmazonQLSPResolver } from './lspInstaller'
import { Commands, ToolkitError } from 'aws-core-vscode/shared'
import { Commands, lspSetupStage, ToolkitError } from 'aws-core-vscode/shared'

export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
try {
const installResult = await new AmazonQLSPResolver().resolve()
await startLanguageServer(ctx, installResult.resourcePaths)
await lspSetupStage('all', async () => {
const installResult = await new AmazonQLSPResolver().resolve()
await lspSetupStage('launch', async () => await startLanguageServer(ctx, installResult.resourcePaths))
})
ctx.subscriptions.push(
Commands.register({ id: 'aws.amazonq.invokeInlineCompletion', autoconnect: true }, async () => {
await vscode.commands.executeCommand('editor.action.inlineSuggest.trigger')
Expand Down
16 changes: 10 additions & 6 deletions packages/amazonq/test/e2e/amazonq/testGen.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { qTestingFramework } from './framework/framework'
import sinon from 'sinon'
import { Messenger } from './framework/messenger'
import { FollowUpTypes } from 'aws-core-vscode/amazonq'
import { registerAuthHook, using, TestFolder } from 'aws-core-vscode/test'
import { registerAuthHook, using, TestFolder, closeAllEditors } from 'aws-core-vscode/test'
import { loginToIdC } from './utils/setup'
import { waitUntil, workspaceUtils } from 'aws-core-vscode/shared'

Expand Down Expand Up @@ -51,10 +51,12 @@ describe('Amazon Q Test Generation', function () {
assert.fail(`Failed to open ${language} file`)
}

await vscode.window.showTextDocument(document, { preview: false })
await waitUntil(async () => {
await vscode.window.showTextDocument(document, { preview: false })
}, {})

const activeEditor = vscode.window.activeTextEditor
if (!activeEditor || activeEditor.document !== document) {
if (!activeEditor || activeEditor.document.uri.fsPath !== document.uri.fsPath) {
assert.fail(`Failed to make temp file active`)
}
}
Expand All @@ -80,7 +82,7 @@ describe('Amazon Q Test Generation', function () {

afterEach(async () => {
// Close all editors to prevent conflicts with subsequent tests trying to open the same file
await vscode.commands.executeCommand('workbench.action.closeAllEditors')
await closeAllEditors()
framework.removeTab(tab.tabID)
framework.dispose()
sinon.restore()
Expand Down Expand Up @@ -161,9 +163,11 @@ describe('Amazon Q Test Generation', function () {
})

for (const { language, filePath } of testFiles) {
describe(`${language} file`, () => {
// skipping for now since this test is flaky. passes locally, but only half the time in CI
// have tried retries for setupTestDocument, openTextDocument, and showTextDocument
describe.skip(`${language} file`, () => {
beforeEach(async () => {
await setupTestDocument(filePath, language)
await waitUntil(async () => await setupTestDocument(filePath, language), {})

tab.addChatMessage({ command: '/test' })
await tab.waitForChatFinishesLoading()
Expand Down
107 changes: 107 additions & 0 deletions packages/amazonq/test/e2e/lsp/lspInstaller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ import sinon from 'sinon'
import { AmazonQLSPResolver, supportedLspServerVersions } from '../../../src/lsp/lspInstaller'
import {
fs,
globals,
LanguageServerResolver,
makeTemporaryToolkitFolder,
ManifestResolver,
manifestStorageKey,
request,
} from 'aws-core-vscode/shared'
import * as semver from 'semver'
import { assertTelemetry } from 'aws-core-vscode/test'
import { LspController } from 'aws-core-vscode/amazonq'
import { LanguageServerSetup } from 'aws-core-vscode/telemetry'

function createVersion(version: string) {
return {
Expand All @@ -40,12 +45,22 @@ describe('AmazonQLSPInstaller', () => {
let resolver: AmazonQLSPResolver
let sandbox: sinon.SinonSandbox
let tempDir: string
// If globalState contains an ETag that is up to date with remote, we won't fetch it resulting in inconsistent behavior.
// Therefore, we clear it temporarily for these tests to ensure consistent behavior.
let manifestStorage: { [key: string]: any }

before(async () => {
manifestStorage = globals.globalState.get(manifestStorageKey) || {}
})

beforeEach(async () => {
sandbox = sinon.createSandbox()
resolver = new AmazonQLSPResolver()
tempDir = await makeTemporaryToolkitFolder()
sandbox.stub(LanguageServerResolver.prototype, 'defaultDownloadFolder').returns(tempDir)
// Called on extension activation and can contaminate telemetry.
sandbox.stub(LspController.prototype, 'trySetupLsp')
await globals.globalState.update(manifestStorageKey, {})
})

afterEach(async () => {
Expand All @@ -56,6 +71,10 @@ describe('AmazonQLSPInstaller', () => {
})
})

after(async () => {
await globals.globalState.update(manifestStorageKey, manifestStorage)
})

describe('resolve()', () => {
it('uses AWS_LANGUAGE_SERVER_OVERRIDE', async () => {
const overridePath = '/custom/path/to/lsp'
Expand Down Expand Up @@ -117,6 +136,94 @@ describe('AmazonQLSPInstaller', () => {
assert.ok(fallback.assetDirectory.startsWith(tempDir))
assert.deepStrictEqual(fallback.location, 'fallback')
assert.ok(semver.satisfies(fallback.version, supportedLspServerVersions))

/* First Try Telemetry
getManifest: remote succeeds
getServer: cache fails then remote succeeds.
validate: succeeds.
*/
const firstTryTelemetry: Partial<LanguageServerSetup>[] = [
{
id: 'AmazonQ',
manifestLocation: 'remote',
languageServerSetupStage: 'getManifest',
result: 'Succeeded',
},
{
id: 'AmazonQ',
languageServerLocation: 'cache',
languageServerSetupStage: 'getServer',
result: 'Failed',
},
{
id: 'AmazonQ',
languageServerLocation: 'remote',
languageServerSetupStage: 'validate',
result: 'Succeeded',
},
{
id: 'AmazonQ',
languageServerLocation: 'remote',
languageServerSetupStage: 'getServer',
result: 'Succeeded',
},
]

/* Second Try Telemetry
getManifest: remote fails, then cache succeeds.
getServer: cache succeeds
validate: doesn't run since its cached.
*/
const secondTryTelemetry: Partial<LanguageServerSetup>[] = [
{
id: 'AmazonQ',
manifestLocation: 'remote',
languageServerSetupStage: 'getManifest',
result: 'Failed',
},
{
id: 'AmazonQ',
manifestLocation: 'cache',
languageServerSetupStage: 'getManifest',
result: 'Succeeded',
},
{
id: 'AmazonQ',
languageServerLocation: 'cache',
languageServerSetupStage: 'getServer',
result: 'Succeeded',
},
]

/* Third Try Telemetry
getManifest: (stubbed to fail, no telemetry)
getServer: remote and cache fail
validate: no validation since not remote.
*/
const thirdTryTelemetry: Partial<LanguageServerSetup>[] = [
{
id: 'AmazonQ',
languageServerLocation: 'cache',
languageServerSetupStage: 'getServer',
result: 'Failed',
},
{
id: 'AmazonQ',
languageServerLocation: 'remote',
languageServerSetupStage: 'getServer',
result: 'Failed',
},
{
id: 'AmazonQ',
languageServerLocation: 'fallback',
languageServerSetupStage: 'getServer',
result: 'Succeeded',
},
]

const expectedTelemetry = firstTryTelemetry.concat(secondTryTelemetry, thirdTryTelemetry)

assertTelemetry('languageServer_setup', expectedTelemetry)
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,21 @@ import * as sinon from 'sinon'
import {
onAcceptance,
AcceptedSuggestionEntry,
session,
CodeWhispererSessionState,
CodeWhispererTracker,
RecommendationHandler,
AuthUtil,
CodeWhispererSession,
} from 'aws-core-vscode/codewhisperer'
import { resetCodeWhispererGlobalVariables, createMockTextEditor } from 'aws-core-vscode/test'
import { assertTelemetryCurried } from 'aws-core-vscode/test'

describe('onAcceptance', function () {
let session: CodeWhispererSession
describe('onAcceptance', function () {
beforeEach(async function () {
session = CodeWhispererSessionState.instance.getSession()
await resetCodeWhispererGlobalVariables()
session.reset()
})

afterEach(function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@ import * as vscode from 'vscode'
import * as sinon from 'sinon'
import { resetCodeWhispererGlobalVariables, createMockTextEditor } from 'aws-core-vscode/test'
import { assertTelemetryCurried } from 'aws-core-vscode/test'
import { onInlineAcceptance, RecommendationHandler, AuthUtil, session } from 'aws-core-vscode/codewhisperer'
import {
onInlineAcceptance,
RecommendationHandler,
AuthUtil,
CodeWhispererSessionState,
CodeWhispererSession,
} from 'aws-core-vscode/codewhisperer'
import { globals } from 'aws-core-vscode/shared'
import { extensionVersion } from 'aws-core-vscode/shared'

describe('onInlineAcceptance', function () {
let session: CodeWhispererSession
describe('onInlineAcceptance', function () {
beforeEach(async function () {
session = CodeWhispererSessionState.instance.getSession()
await resetCodeWhispererGlobalVariables()
session.reset()
})

afterEach(function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
getLabel,
Recommendation,
RecommendationHandler,
session,
CodeWhispererSessionState,
} from 'aws-core-vscode/codewhisperer'
import { createMockDocument, resetCodeWhispererGlobalVariables } from 'aws-core-vscode/test'

Expand All @@ -39,6 +39,7 @@ describe('completionProviderService', function () {

describe('getCompletionItem', function () {
it('should return targetCompletionItem given input', function () {
const session = CodeWhispererSessionState.instance.getSession()
session.startPos = new vscode.Position(0, 0)
RecommendationHandler.instance.requestId = 'mock_requestId_getCompletionItem'
session.sessionId = 'mock_sessionId_getCompletionItem'
Expand Down Expand Up @@ -95,6 +96,7 @@ describe('completionProviderService', function () {

describe('getCompletionItems', function () {
it('should return completion items for each non-empty recommendation', async function () {
const session = CodeWhispererSessionState.instance.getSession()
session.recommendations = [
{ content: "\n\t\tconsole.log('Hello world!');\n\t}" },
{ content: '\nvar a = 10' },
Expand All @@ -106,6 +108,7 @@ describe('completionProviderService', function () {
})

it('should return empty completion items when recommendation is empty', async function () {
const session = CodeWhispererSessionState.instance.getSession()
session.recommendations = []
const mockPosition = new vscode.Position(14, 83)
const mockDocument = createMockDocument()
Expand Down
Loading
Loading