Skip to content

Commit 738b957

Browse files
committed
remove account-id input
1 parent bffa5ad commit 738b957

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

packages/amazonq/src/lsp/chat/messages.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ import * as jose from 'jose'
6161
import { AmazonQChatViewProvider } from './webviewProvider'
6262
import { AuthUtil, ReferenceLogViewProvider } from 'aws-core-vscode/codewhisperer'
6363
import { amazonQDiffScheme, AmazonQPromptSettings, messages, openUrl } from 'aws-core-vscode/shared'
64-
import { credentialsValidation } from 'aws-core-vscode/auth'
6564
import {
6665
DefaultAmazonQAppInitContext,
6766
messageDispatcher,
@@ -328,26 +327,6 @@ export function registerMessageListeners(
328327
}
329328
break
330329
case buttonClickRequestType.method: {
331-
if (message.params.buttonId === 'paidtier-upgrade-q') {
332-
focusAmazonQPanel().catch((e) => languageClient.error(`[VSCode Client] focusAmazonQPanel() failed`))
333-
334-
const accountId = await vscode.window.showInputBox({
335-
title: 'Upgrade Amazon Q',
336-
prompt: 'Enter your 12-digit AWS account ID',
337-
placeHolder: '111111111111',
338-
validateInput: credentialsValidation.validateAwsAccount,
339-
})
340-
341-
if (accountId) {
342-
languageClient.sendRequest('workspace/executeCommand', {
343-
command: 'aws/chat/manageSubscription',
344-
arguments: [accountId],
345-
})
346-
} else {
347-
languageClient.error('[VSCode Client] user canceled or did not input AWS account id')
348-
}
349-
}
350-
351330
const buttonResult = await languageClient.sendRequest<ButtonClickResult>(
352331
buttonClickRequestType.method,
353332
message.params

packages/core/src/auth/credentials/validation.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,6 @@ async function validateProfileName(profileName: SectionName) {
127127
}
128128
}
129129

130-
export function validateAwsAccount(s: string): string | undefined {
131-
// AWS account IDs are exactly 12 digits
132-
if (!/^\d{12}$/.test(s)) {
133-
return 'Enter a valid 12-digit AWS account ID'
134-
}
135-
return undefined
136-
}
137-
138130
// All shared credentials keys
139131
const sharedCredentialsKeysSet = new Set(Object.values(SharedCredentialsKeys))
140132

0 commit comments

Comments
 (0)