Skip to content

Commit 38230ac

Browse files
authored
Merge branch 'aws:master' into feature/folderscans
2 parents 02023b5 + 25e52ab commit 38230ac

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed
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": "Amazon Q inline suggestions: remember `Pause Auto-Suggestions` after IDE restart"
4+
}

packages/amazonq/src/extensionCommon.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import * as vscode from 'vscode'
77
import * as semver from 'semver'
88
import { join } from 'path'
99
import {
10-
CodeSuggestionsState,
1110
activate as activateCodeWhisperer,
1211
shutdown as shutdownCodeWhisperer,
1312
amazonQDismissedKey,
@@ -113,9 +112,6 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
113112
// reload webviews
114113
await vscode.commands.executeCommand('workbench.action.webview.reloadWebviewAction')
115114

116-
// enable auto suggestions on activation
117-
await CodeSuggestionsState.instance.setSuggestionsEnabled(true)
118-
119115
if (AuthUtils.ExtensionUse.instance.isFirstUse()) {
120116
CommonAuthWebview.authSource = ExtStartUpSources.firstStartUp
121117
await vscode.commands.executeCommand('workbench.view.extension.amazonq')

packages/core/src/login/webview/vue/login.vue

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,16 @@ export default defineComponent({
366366
await this.emitUpdate('created')
367367
},
368368
369-
mounted() {
369+
async mounted() {
370370
this.fetchRegions()
371-
void this.updateExistingConnections()
371+
await this.updateExistingConnections()
372372
373373
// Reset gathered telemetry data each time we view the login page.
374374
// The webview panel is reset on each view of the login page by design.
375-
void client.resetStoredMetricMetadata()
375+
client.resetStoredMetricMetadata()
376+
377+
// Pre-select the first available login option
378+
await this.preselectLoginOption()
376379
},
377380
methods: {
378381
toggleItemSelection(itemId: number) {
@@ -563,6 +566,17 @@ export default defineComponent({
563566
handleHelpLinkClick() {
564567
void client.emitUiClick('auth_helpLink')
565568
},
569+
async preselectLoginOption() {
570+
// Select the first available option for Login
571+
if (this.existingLogins.length > 0) {
572+
this.selectedLoginOption = LoginOption.EXISTING_LOGINS
573+
} else if (this.app === 'AMAZONQ') {
574+
this.selectedLoginOption = LoginOption.BUILDER_ID
575+
} else if (this.app === 'TOOLKIT') {
576+
this.selectedLoginOption = LoginOption.ENTERPRISE_SSO
577+
}
578+
this.$forceUpdate()
579+
},
566580
shouldDisableSsoContinue() {
567581
return this.startUrl.length == 0 || this.startUrlError.length > 0 || !this.selectedRegion
568582
},

packages/core/src/test/codewhisperer/commands/transformByQ.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ describe('transformByQ', function () {
179179
status: 'COMPLETED',
180180
},
181181
}
182-
assert.deepStrictEqual(actual, expected)
182+
assert.equal(actual['abc-123'].projectName, expected['abc-123'].projectName)
183183
})
184184

185185
it(`WHEN get headers for upload artifact to S3 THEN returns correct header with kms key arn`, function () {

0 commit comments

Comments
 (0)