Skip to content

Commit 3f90f66

Browse files
committed
merge: resolve package-lock conflicts
2 parents edea877 + a6677ac commit 3f90f66

File tree

38 files changed

+9001
-3426
lines changed

38 files changed

+9001
-3426
lines changed

package-lock.json

Lines changed: 8290 additions & 2534 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"skippedTestReport": "ts-node ./scripts/skippedTestReport.ts ./packages/amazonq/test/e2e/"
4242
},
4343
"devDependencies": {
44-
"@aws-toolkits/telemetry": "^1.0.307",
44+
"@aws-toolkits/telemetry": "^1.0.308",
4545
"@playwright/browser-chromium": "^1.43.1",
4646
"@stylistic/eslint-plugin": "^2.11.0",
4747
"@types/he": "^1.2.3",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "increase scan timeout to reduce front-end timeout errors"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "/review: show code diff for fix preview"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "/test: display test plan summary in chat after generating tests"
4+
}

packages/amazonq/test/unit/codewhisperer/service/securityScanHandler.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
ListCodeScanFindingsResponse,
1616
pollScanJobStatus,
1717
SecurityScanTimedOutError,
18+
CodeWhispererConstants,
1819
} from 'aws-core-vscode/codewhisperer'
1920
import { timeoutUtils } from 'aws-core-vscode/shared'
2021
import assert from 'assert'
@@ -303,7 +304,7 @@ describe('securityScanHandler', function () {
303304

304305
const pollPromise = pollScanJobStatus(mockClient, mockJobId, CodeAnalysisScope.FILE_AUTO, mockStartTime)
305306

306-
const expectedTimeoutMs = 60_000
307+
const expectedTimeoutMs = CodeWhispererConstants.expressScanTimeoutMs
307308
clock.tick(expectedTimeoutMs + 1000)
308309

309310
await assert.rejects(() => pollPromise, SecurityScanTimedOutError)
@@ -314,7 +315,7 @@ describe('securityScanHandler', function () {
314315

315316
const pollPromise = pollScanJobStatus(mockClient, mockJobId, CodeAnalysisScope.PROJECT, mockStartTime)
316317

317-
const expectedTimeoutMs = 600_000
318+
const expectedTimeoutMs = CodeWhispererConstants.standardScanTimeoutMs
318319
clock.tick(expectedTimeoutMs + 1000)
319320

320321
await assert.rejects(() => pollPromise, SecurityScanTimedOutError)

packages/core/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@
504504
"@aws-sdk/client-ec2": "<3.696.0",
505505
"@aws-sdk/client-iam": "<3.696.0",
506506
"@aws-sdk/client-s3": "<3.696.0",
507+
"@aws-sdk/client-api-gateway": "<3.696.0",
507508
"@aws-sdk/lib-storage": "<3.696.0",
508509
"@aws-sdk/client-lambda": "<3.696.0",
509510
"@aws-sdk/client-ssm": "<3.696.0",
@@ -517,6 +518,7 @@
517518
"@aws-sdk/protocol-http": "<3.696.0",
518519
"@aws-sdk/smithy-client": "<3.696.0",
519520
"@aws-sdk/util-arn-parser": "<3.696.0",
521+
"@aws-sdk/client-codecatalyst": "<3.696.0",
520522
"@aws-sdk/s3-request-presigner": "<3.696.0",
521523
"@aws/mynah-ui": "^4.23.1",
522524
"@gerhobbelt/gitignore-parser": "^0.2.0-9",

packages/core/src/amazonq/lsp/lspController.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ export class LspController {
357357
amazonqIndexMemoryUsageInMB: usage ? usage.memoryUsage / (1024 * 1024) : undefined,
358358
amazonqIndexCpuUsagePercentage: usage ? usage.cpuUsage : undefined,
359359
amazonqIndexFileSizeInMB: totalSizeBytes / (1024 * 1024),
360+
amazonqVectorIndexEnabled: buildIndexConfig.isVectorIndexEnabled,
360361
credentialStartUrl: buildIndexConfig.startUrl,
361362
})
362363
} else {
@@ -366,6 +367,7 @@ export class LspController {
366367
result: 'Failed',
367368
amazonqIndexFileCount: 0,
368369
amazonqIndexFileSizeInMB: 0,
370+
amazonqVectorIndexEnabled: buildIndexConfig.isVectorIndexEnabled,
369371
reason: `Unknown`,
370372
})
371373
}
@@ -377,6 +379,7 @@ export class LspController {
377379
result: 'Failed',
378380
amazonqIndexFileCount: 0,
379381
amazonqIndexFileSizeInMB: 0,
382+
amazonqVectorIndexEnabled: buildIndexConfig.isVectorIndexEnabled,
380383
reason: `${error instanceof Error ? error.name : 'Unknown'}`,
381384
reasonDesc: `Error when building index. ${error instanceof Error ? error.message : error}`,
382385
})

packages/core/src/amazonq/webview/ui/apps/testChatConnector.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export class Connector extends BaseConnector {
8686

8787
onCustomFormAction(
8888
tabId: string,
89+
messageId: string,
8990
action: {
9091
id: string
9192
text?: string | undefined
@@ -105,6 +106,33 @@ export class Connector extends BaseConnector {
105106
tabID: tabId,
106107
description: action.description,
107108
})
109+
110+
if (this.onChatAnswerUpdated === undefined) {
111+
return
112+
}
113+
const answer: ChatItem = {
114+
type: ChatItemType.ANSWER,
115+
messageId: messageId,
116+
buttons: [],
117+
}
118+
// TODO: Add more cases for Accept/Reject/viewDiff.
119+
switch (action.id) {
120+
case 'Provide-Feedback':
121+
answer.buttons = [
122+
{
123+
keepCardAfterClick: true,
124+
text: 'Thanks for providing feedback.',
125+
id: 'utg_provided_feedback',
126+
status: 'success',
127+
position: 'outside',
128+
disabled: true,
129+
},
130+
]
131+
break
132+
default:
133+
break
134+
}
135+
this.onChatAnswerUpdated(tabId, answer)
108136
}
109137

110138
onFileDiff = (tabID: string, filePath: string, deleted: boolean, messageId?: string): void => {

packages/core/src/amazonq/webview/ui/connector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ export class Connector {
695695
this.gumbyChatConnector.onCustomFormAction(tabId, action)
696696
break
697697
case 'testgen':
698-
this.testChatConnector.onCustomFormAction(tabId, action)
698+
this.testChatConnector.onCustomFormAction(tabId, messageId ?? '', action)
699699
break
700700
case 'review':
701701
this.scanChatConnector.onCustomFormAction(tabId, action)

0 commit comments

Comments
 (0)