Skip to content

Commit f6d5be7

Browse files
authored
feat(amazonq): update notification message aws#4717
1 parent a6b0b22 commit f6d5be7

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

packages/core/src/codewhisperer/util/authUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ export class AuthUtil {
394394

395395
await showReauthenticateMessage({
396396
message: localizedText.connectionExpired('Amazon Q'),
397-
connect: localizedText.connect,
397+
connect: localizedText.reauthenticate,
398398
suppressId: 'codeWhispererConnectionExpired',
399399
settings: AmazonQPromptSettings.instance,
400400
reauthFunc: async () => {

packages/core/src/shared/localizedText.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,9 @@ export const loadMore = localize('AWS.generic.loadMore', 'Load More')
2727
export const learnMore = localize('AWS.generic.learnMore', 'Learn More')
2828
export const proceed = localize('AWS.generic.proceed', 'Proceed')
2929
export const connect = localize('AWS.auth.connect', 'Connect with AWS')
30+
export const reauthenticate = localize('AWS.auth.reauthenticate', 'Re-authenticate')
3031
export function connectionExpired(name: string) {
31-
return localize(
32-
'AWS.auth.expired',
33-
'Connection expired. To continue using {0}, connect with AWS Builder ID or AWS IAM Identity center.',
34-
name
35-
)
32+
return localize('AWS.auth.expired', `Your ${name} connection has expired. Please re-authenticate.`)
3633
}
3734

3835
export const checklogs = () =>

packages/core/src/shared/telemetry/activation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function showTelemetryNotice(extensionContext: vscode.ExtensionContext) {
8787

8888
const telemetryNoticeText: string = localize(
8989
'AWS.telemetry.notificationMessage',
90-
'{0} Toolkit collects anonymous usage metrics to help drive toolkit improvements. This can be changed in the settings.',
90+
'AWS IDE Extensions collects anonymous usage metrics to improve the product. You can opt-out in settings.',
9191
getIdeProperties().company
9292
)
9393

packages/core/src/test/codewhisperer/util/authUtil.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,7 @@ describe('AuthUtil', async function () {
122122

123123
const warningMessage = getTestWindow().shownMessages.filter(m => m.severity === SeverityLevel.Information)
124124
assert.strictEqual(warningMessage.length, 1)
125-
assert.strictEqual(
126-
warningMessage[0].message,
127-
'Connection expired. To continue using Amazon Q, connect with AWS Builder ID or AWS IAM Identity center.'
128-
)
125+
assert.strictEqual(warningMessage[0].message, `Your Amazon Q connection has expired. Please re-authenticate.`)
129126
})
130127

131128
it('reauthenticate prompt reauthenticates invalid connection', async function () {
@@ -134,7 +131,7 @@ describe('AuthUtil', async function () {
134131
)
135132
await auth.useConnection(conn)
136133
getTestWindow().onDidShowMessage(m => {
137-
m.selectItem('Connect with AWS')
134+
m.selectItem('Re-authenticate')
138135
})
139136
assert.strictEqual(auth.getConnectionState(conn), 'invalid')
140137

0 commit comments

Comments
 (0)