5
5
6
6
import * as vscode from 'vscode'
7
7
import { CodeCatalystClient } from '../shared/clients/codecatalystClient'
8
- import { isCloud9 } from '../shared/extensionUtilities'
8
+ import { getIdeProperties , isCloud9 } from '../shared/extensionUtilities'
9
9
import {
10
10
Auth ,
11
11
isBuilderIdConnection ,
@@ -106,18 +106,19 @@ export class CodeCatalystAuthenticationProvider {
106
106
107
107
const conn = ( await this . auth . listConnections ( ) ) . find ( isBuilderIdConnection )
108
108
const isNewUser = conn === undefined
109
- const okItem : vscode . MessageItem = { title : localizedText . ok }
109
+ const continueItem : vscode . MessageItem = { title : localizedText . continueText }
110
110
const cancelItem : vscode . MessageItem = { title : localizedText . cancel , isCloseAffordance : true }
111
111
112
112
if ( isNewUser || ! isValidCodeCatalystConnection ( conn ) ) {
113
113
// TODO: change to `satisfies` on TS 4.9
114
114
telemetry . record ( { codecatalyst_connectionFlow : isNewUser ? 'Create' : 'Upgrade' } as ConnectionFlowEvent )
115
115
116
- const message = isNewUser
117
- ? 'CodeCatalyst requires an AWS Builder ID connection. Creating a connection opens your browser to login.\n\n Create one now?'
118
- : 'Your AWS Builder ID connection does not have access to CodeCatalyst. Upgrading the connection requires another login.\n\n Upgrade now?'
119
- const resp = await vscode . window . showInformationMessage ( message , { modal : true } , okItem , cancelItem )
120
- if ( resp !== okItem ) {
116
+ const message = `The ${
117
+ getIdeProperties ( ) . company
118
+ } Toolkit extension requires a connection for CodeCatalyst to begin.\n\n Proceed to the browser to allow access?`
119
+
120
+ const resp = await vscode . window . showInformationMessage ( message , { modal : true } , continueItem , cancelItem )
121
+ if ( resp !== continueItem ) {
121
122
throw new ToolkitError ( 'Not connected to CodeCatalyst' , { code : 'NoConnection' , cancelled : true } )
122
123
}
123
124
@@ -136,10 +137,10 @@ export class CodeCatalystAuthenticationProvider {
136
137
const resp = await vscode . window . showInformationMessage (
137
138
'CodeCatalyst requires an AWS Builder ID connection.\n\n Switch to it now?' ,
138
139
{ modal : true } ,
139
- okItem ,
140
+ continueItem ,
140
141
cancelItem
141
142
)
142
- if ( resp !== okItem ) {
143
+ if ( resp !== continueItem ) {
143
144
throw new ToolkitError ( 'Not connected to CodeCatalyst' , { code : 'NoConnection' , cancelled : true } )
144
145
}
145
146
0 commit comments