Skip to content

Commit e57e155

Browse files
authored
Revert "feat(sagemaker): free tier Q Chat with auto-login for iam users and login option for pro tier users" (#5884)
Reverts #5858
1 parent ffae386 commit e57e155

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+9770
-19969
lines changed

docs/build.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
# Build
22

3-
The AmazonQ features rely on the `codewhisperer-streaming` service, to support both Sigv4 and Bearer token modes of this service,
4-
two clients are generated from the service's smithy models and placed in
5-
`src.gen/@amzn/amazon-q-developer-streaming-client` and `src.gen/@amzn/codewhisperer-streaming` respectively (For more
6-
information about these clients and how they are generated, please see this
3+
The AmazonQ features rely on the `codewhisperer-streaming` service, who's client
4+
is generated from the service's smithy models and placed in
5+
`src.gen/@amzn/codewhisperer-streaming` (For more
6+
information about this client and how it is generated, please see this
77
[quip document](https://quip-amazon.com/2dAWAvTIYXXr/Build-instructions-for-AWS-CodeWhisperer-Streaming-Typescript-client)).
88

9-
## @amzn/amazon-q-developer-streaming client
10-
11-
This client is a standalone npm project in typescript, and it is added to
12-
the project as a workspace in the project's root `package.json` with the line `"workspaces": [ ..., "src.gen/@amzn/amazon-q-developer-streaming" ]`.
13-
The client may be manually built using `npm run build -w @amzn/amazon-q-developer-streaming"`.
14-
The `generateClients` run script ensures that this dependency is
15-
built before the toolkit project itself. Workspaces are automatically ready to
16-
be imported in the root toolkit project by their declared package.json name,
17-
(`@amzn/amazon-q-developer-streaming` in this case).
18-
19-
## @amzn/codewhisperer-streaming client
20-
219
This client is a standalone npm project in typescript, and it is added to
2210
the project as a workspace in the project's root `package.json` with the line `"workspaces": [ ..., "src.gen/@amzn/codewhisperer-streaming" ]`.
2311
The client may be manually built using `npm run build -w @amzn/codewhisperer-streaming"`.

package-lock.json

Lines changed: 9709 additions & 10566 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
@@ -20,7 +20,7 @@
2020
},
2121
"scripts": {
2222
"prepare": "ts-node ./scripts/prepare.ts",
23-
"preinstall": "cd src.gen/@amzn/codewhisperer-streaming && npm i && cd ../amazon-q-developer-streaming-client && npm i",
23+
"preinstall": "cd src.gen/@amzn/codewhisperer-streaming && npm i",
2424
"postinstall": "npm run buildCustomLintPlugin && npm run postinstall -ws --if-present",
2525
"buildCustomLintPlugin": "npm run build -w plugins/eslint-plugin-aws-toolkits",
2626
"compile": "npm run compile -w packages/",

packages/amazonq/.changes/next-release/Bug Fix-0ee7be24-b0f8-460b-a852-a2d08b6d289e.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/.changes/next-release/Bug Fix-4db8f989-da38-467f-bf2e-598c9ed9af81.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/.changes/next-release/Bug Fix-cbd8faed-6375-40e7-9f82-0e402e8fc0ad.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/.changes/next-release/Feature-a007f02d-d737-4429-9b7d-245aa30d879c.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,13 @@
196196
"type": "webview",
197197
"id": "aws.amazonq.AmazonCommonAuth",
198198
"name": "%AWS.amazonq.login%",
199-
"when": "!aws.isWebExtHost && aws.amazonq.showLoginView"
199+
"when": "!aws.isSageMaker && !aws.isWebExtHost && aws.amazonq.showLoginView"
200200
},
201201
{
202202
"type": "webview",
203203
"id": "aws.AmazonQChatView",
204204
"name": "%AWS.amazonq.chat%",
205-
"when": "!aws.isWebExtHost && !aws.amazonq.showLoginView"
205+
"when": "!aws.isSageMaker && !aws.isWebExtHost && !aws.amazonq.showLoginView"
206206
},
207207
{
208208
"id": "aws.AmazonQNeverShowBadge",

packages/amazonq/src/api.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import { SendMessageCommandOutput, SendMessageRequest } from '@amzn/amazon-q-developer-streaming-client'
76
import { GenerateAssistantResponseCommandOutput, GenerateAssistantResponseRequest } from '@amzn/codewhisperer-streaming'
87
import { AuthUtil } from 'aws-core-vscode/codewhisperer'
98
import { ChatSession } from 'aws-core-vscode/codewhispererChat'
@@ -13,11 +12,7 @@ export default {
1312
chatApi: {
1413
async chat(request: GenerateAssistantResponseRequest): Promise<GenerateAssistantResponseCommandOutput> {
1514
const chatSession = new ChatSession()
16-
return chatSession.chatSso(request)
17-
},
18-
async chatIam(request: SendMessageRequest): Promise<SendMessageCommandOutput> {
19-
const chatSession = new ChatSession()
20-
return chatSession.chatIam(request)
15+
return chatSession.chat(request)
2116
},
2217
},
2318
authApi: {

packages/amazonq/src/extension.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import {
4444
setContext,
4545
setupUninstallHandler,
4646
maybeShowMinVscodeWarning,
47-
isSageMaker,
4847
} from 'aws-core-vscode/shared'
4948
import { ExtStartUpSources, telemetry } from 'aws-core-vscode/telemetry'
5049
import { VSCODE_EXTENSION_ID } from 'aws-core-vscode/utils'
@@ -194,7 +193,7 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
194193
}
195194
}
196195
const currConn = AuthUtil.instance.conn
197-
if (currConn !== undefined && !(isAnySsoConnection(currConn) || isSageMaker())) {
196+
if (currConn !== undefined && !isAnySsoConnection(currConn)) {
198197
getLogger().error(`Current Amazon Q connection is not SSO, type is: %s`, currConn?.type)
199198
}
200199

0 commit comments

Comments
 (0)