Skip to content

Commit 6b56faf

Browse files
authored
Merge branch 'aws:master' into master
2 parents 2b89200 + 525181b commit 6b56faf

File tree

31 files changed

+1239
-503
lines changed

31 files changed

+1239
-503
lines changed

buildspec/linuxE2ETests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ phases:
3737
commands:
3838
- export HOME=/home/codebuild-user
3939
# Ignore failure until throttling issues are fixed.
40-
- xvfb-run npm run testE2E || true
40+
- xvfb-run npm run testE2E
4141
- VCS_COMMIT_ID="${CODEBUILD_RESOLVED_SOURCE_VERSION}"
4242
- CI_BUILD_URL=$(echo $CODEBUILD_BUILD_URL | sed 's/#/%23/g')
4343
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"

package-lock.json

Lines changed: 4 additions & 5 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
@@ -39,7 +39,7 @@
3939
"generateNonCodeFiles": "npm run generateNonCodeFiles -w packages/ --if-present"
4040
},
4141
"devDependencies": {
42-
"@aws-toolkits/telemetry": "^1.0.287",
42+
"@aws-toolkits/telemetry": "^1.0.289",
4343
"@playwright/browser-chromium": "^1.43.1",
4444
"@stylistic/eslint-plugin": "^2.11.0",
4545
"@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": "/review: Apply fix removes other issues in the same file."
4+
}
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": "Fix(Amazon Q Code Transformation): show correct diff when running consecutive transformations"
4+
}
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": "Improve when the welcome page is shown in amazon q chat"
4+
}

packages/amazonq/test/unit/codewhisperer/util/crossFileContextUtil.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe('crossFileContextUtil', function () {
9696
assert.strictEqual(actual.supplementalContextItems[3].content.split('\n').length, 50)
9797
})
9898

99-
it('for t2 group, should return global bm25 context and no repomap', async function () {
99+
it.skip('for t2 group, should return global bm25 context and no repomap', async function () {
100100
await toTextEditor(aStringWithLineCount(200), 'CrossFile.java', tempFolder, { preview: false })
101101
const myCurrentEditor = await toTextEditor('', 'TargetFile.java', tempFolder, {
102102
preview: false,

packages/core/src/amazonq/webview/generators/webViewContent.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class WebViewContentGenerator {
2323
return JSON.stringify(Array.from(featureConfigs.entries()))
2424
}
2525

26-
public async generate(extensionURI: Uri, webView: Webview, showWelcomePage: boolean): Promise<string> {
26+
public async generate(extensionURI: Uri, webView: Webview): Promise<string> {
2727
const entrypoint = process.env.WEBPACK_DEVELOPER_SERVER
2828
? 'http: localhost'
2929
: 'https: file+.vscode-resources.vscode-cdn.net'
@@ -47,14 +47,14 @@ export class WebViewContentGenerator {
4747
<head>
4848
<meta http-equiv="Content-Security-Policy" content="${contentPolicy}">
4949
<title>Amazon Q (Preview)</title>
50-
${await this.generateJS(extensionURI, webView, showWelcomePage)}
50+
${await this.generateJS(extensionURI, webView)}
5151
</head>
5252
<body ${featureDataAttributes}>
5353
</body>
5454
</html>`
5555
}
5656

57-
private async generateJS(extensionURI: Uri, webView: Webview, showWelcomePage: boolean): Promise<string> {
57+
private async generateJS(extensionURI: Uri, webView: Webview): Promise<string> {
5858
const source = path.join('vue', 'src', 'amazonq', 'webview', 'ui', 'amazonq-ui.js') // Sent to dist/vue folder in webpack.
5959
const assetsPath = Uri.joinPath(extensionURI)
6060
const javascriptUri = Uri.joinPath(assetsPath, 'dist', source)
@@ -80,14 +80,16 @@ export class WebViewContentGenerator {
8080
const disabledCommandsString = isSageMaker() ? `['/dev', '/transform']` : '[]'
8181
const disclaimerAcknowledged = globals.globalState.tryGet('aws.amazonq.disclaimerAcknowledged', Boolean, false)
8282

83+
const welcomeLoadCount = globals.globalState.tryGet('aws.amazonq.welcomeChatShowCount', Number, 0)
84+
8385
return `
8486
<script type="text/javascript" src="${javascriptEntrypoint.toString()}" defer onload="init()"></script>
8587
${cssLinks}
8688
<script type="text/javascript">
8789
const init = () => {
8890
createMynahUI(acquireVsCodeApi(), ${
8991
(await AuthUtil.instance.getChatAuthState()).amazonQ === 'connected'
90-
},${featureConfigsString},${showWelcomePage},${disclaimerAcknowledged},${disabledCommandsString});
92+
},${featureConfigsString},${welcomeLoadCount},${disclaimerAcknowledged},${disabledCommandsString});
9193
}
9294
</script>
9395
`

packages/core/src/amazonq/webview/messages/messageDispatcher.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ export function dispatchWebViewMessagesToApps(
7474
globals.globalState.tryUpdate('aws.amazonq.disclaimerAcknowledged', true)
7575
return
7676
}
77+
case 'update-welcome-count': {
78+
const currentLoadCount = globals.globalState.tryGet('aws.amazonq.welcomeChatShowCount', Number, 0)
79+
void globals.globalState.tryUpdate('aws.amazonq.welcomeChatShowCount', currentLoadCount + 1)
80+
return
81+
}
7782
}
7883

7984
if (msg.type === 'error') {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@ type MessageCommand =
4141
| 'review'
4242
| 'open-user-guide'
4343
| 'send-telemetry'
44+
| 'update-welcome-count'
4445

4546
export type ExtensionMessage = Record<string, any> & { command: MessageCommand }

0 commit comments

Comments
 (0)