Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildspec/release/10changeversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ phases:
DATE=$(date)
npm version --no-git-tag-version "$VERSION" -w packages/${TARGET_EXTENSION}
# 'createRelease' uses ts-node.
# Ignore broken "postinstall" script in "src.gen/@amzn/codewhisperer-streaming/package.json".
# Ignore broken "postinstall" script in "src.gen/@amzn/amazon-codewhisperer-streaming/package.json".
npm install --ignore-scripts ts-node
- |
npm run createRelease -w packages/${TARGET_EXTENSION}
Expand Down
10 changes: 5 additions & 5 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

Expand All @@ -16,12 +16,12 @@ built before the toolkit project itself. Workspaces are automatically ready to
be imported in the root toolkit project by their declared package.json name,
(`@amzn/amazon-q-developer-streaming` in this case).

## @amzn/codewhisperer-streaming client
## @amzn/amazon-codewhisperer-streaming client

This client is a standalone npm project in typescript, and it is added to
the project as a workspace in the project's root `package.json` with the line `"workspaces": [ ..., "src.gen/@amzn/codewhisperer-streaming" ]`.
The client may be manually built using `npm run build -w @amzn/codewhisperer-streaming"`.
the project as a workspace in the project's root `package.json` with the line `"workspaces": [ ..., "src.gen/@amzn/amazon-codewhisperer-streaming" ]`.
The client may be manually built using `npm run build -w @amzn/amazon-codewhisperer-streaming"`.
The `generateClients` run script ensures that this dependency is
built before the toolkit project itself. Workspaces are automatically ready to
be imported in the root toolkit project by their declared package.json name,
(`@amzn/codewhisperer-streaming` in this case).
(`@amzn/amazon-codewhisperer-streaming` in this case).
31,211 changes: 17,524 additions & 13,687 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"scripts": {
"prepare": "ts-node ./scripts/prepare.ts",
"preinstall": "cd src.gen/@amzn/codewhisperer-streaming && npm i && cd ../amazon-q-developer-streaming-client && npm i",
"preinstall": "cd src.gen/@amzn/amazon-codewhisperer-streaming && npm i && cd ../amazon-q-developer-streaming-client && npm i",
"postinstall": "npm run buildCustomLintPlugin && npm run postinstall -ws --if-present",
"buildCustomLintPlugin": "npm run build -w plugins/eslint-plugin-aws-toolkits",
"compile": "npm run compile -w packages/",
Expand Down
5 changes: 4 additions & 1 deletion packages/amazonq/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
*/

import { SendMessageCommandOutput, SendMessageRequest } from '@amzn/amazon-q-developer-streaming-client'
import { GenerateAssistantResponseCommandOutput, GenerateAssistantResponseRequest } from '@amzn/codewhisperer-streaming'
import {
GenerateAssistantResponseCommandOutput,
GenerateAssistantResponseRequest,
} from '@amzn/amazon-codewhisperer-streaming'
import { AuthUtil } from 'aws-core-vscode/codewhisperer'
import { ChatSession } from 'aws-core-vscode/codewhispererChat'
import { api } from 'aws-core-vscode/amazonq'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as vscode from 'vscode'
import {
CodeWhispererStreamingServiceException,
GenerateAssistantResponseCommandOutput,
} from '@amzn/codewhisperer-streaming'
} from '@amzn/amazon-codewhisperer-streaming'
import { AuthUtil, getSelectedCustomization } from 'aws-core-vscode/codewhisperer'
import {
ChatSessionStorage,
Expand Down
14 changes: 7 additions & 7 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -495,13 +495,13 @@
},
"dependencies": {
"@amzn/amazon-q-developer-streaming-client": "file:../../src.gen/@amzn/amazon-q-developer-streaming-client",
"@amzn/codewhisperer-streaming": "file:../../src.gen/@amzn/codewhisperer-streaming",
"@aws-sdk/client-cloudformation": "^3.667.0",
"@aws-sdk/client-cloudwatch-logs": "^3.666.0",
"@aws-sdk/client-cognito-identity": "^3.637.0",
"@aws-sdk/client-lambda": "^3.637.0",
"@aws-sdk/client-sso": "^3.342.0",
"@aws-sdk/client-sso-oidc": "^3.574.0",
"@amzn/amazon-codewhisperer-streaming": "file:../../src.gen/@amzn/amazon-codewhisperer-streaming",
"@aws-sdk/client-cloudformation": "<=3.658.1",
"@aws-sdk/client-cloudwatch-logs": "<=3.658.1",
"@aws-sdk/client-cognito-identity": "<=3.658.1",
"@aws-sdk/client-lambda": "<=3.658.1",
"@aws-sdk/client-sso": "<=3.658.1",
"@aws-sdk/client-sso-oidc": "<=3.658.1",
"@aws-sdk/credential-provider-ini": "3.46.0",
"@aws-sdk/credential-provider-process": "3.37.0",
"@aws-sdk/credential-provider-sso": "^3.345.0",
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/amazonq/extApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
import vscode from 'vscode'
import { VSCODE_EXTENSION_ID } from '../shared/utilities'
import { SendMessageCommandOutput, SendMessageRequest } from '@amzn/amazon-q-developer-streaming-client'
import { GenerateAssistantResponseCommandOutput, GenerateAssistantResponseRequest } from '@amzn/codewhisperer-streaming'
import {
GenerateAssistantResponseCommandOutput,
GenerateAssistantResponseRequest,
} from '@amzn/amazon-codewhisperer-streaming'
import { FeatureAuthState } from '../codewhisperer/util/authUtil'
import { ToolkitError } from '../shared'

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/amazonq/lsp/lspController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import fetch from 'node-fetch'
import request from '../../shared/request'
import { LspClient } from './lspClient'
import AdmZip from 'adm-zip'
import { RelevantTextDocument } from '@amzn/codewhisperer-streaming'
import { RelevantTextDocument } from '@amzn/amazon-codewhisperer-streaming'
import { makeTemporaryToolkitFolder, tryRemoveFolder } from '../../shared/filesystemUtilities'
import { activate as activateLsp } from './lspClient'
import { telemetry } from '../../shared/telemetry'
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/amazonq/webview/ui/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { TabType, TabsStorage } from './storages/tabsStorage'
import { WelcomeFollowupType } from './apps/amazonqCommonsConnector'
import { AuthFollowUpType } from './followUps/generator'
import { DiffTreeFileInfo } from './diffTree/types'
import { UserIntent } from '@amzn/codewhisperer-streaming'
import { UserIntent } from '@amzn/amazon-codewhisperer-streaming'

export interface CodeReference {
licenseName?: string
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/amazonqFeatureDev/client/featureDev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
MetricData,
TelemetryEvent,
} from './featuredevproxyclient'
import { ExportResultArchiveCommandInput } from '@amzn/amazon-codewhisperer-streaming'

// Re-enable once BE is able to handle retries.
const writeAPIRetryOptions = {
Expand Down Expand Up @@ -227,7 +228,7 @@ export class FeatureDevClient {
public async exportResultArchive(conversationId: string) {
try {
const streamingClient = await createCodeWhispererChatStreamingClient()
const params = {
const params: ExportResultArchiveCommandInput = {
exportId: conversationId,
exportIntent: 'TASK_ASSIST',
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import {
runBuildCommand,
startTestGenerationProcess,
} from '../../../codewhisperer/commands/startTestGeneration'
import { UserIntent } from '@amzn/codewhisperer-streaming'
import { UserIntent } from '@amzn/amazon-codewhisperer-streaming'
import { getSelectedCustomization } from '../../../codewhisperer/util/customizationUtil'
import { createCodeWhispererChatStreamingClient } from '../../../shared/clients/codewhispererChatClient'
import { ChatTriggerType } from '../../../codewhispererChat/controllers/chat/model'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { TriggerPayload } from '../../../../codewhispererChat/controllers/chat/m
import {
CodeWhispererStreamingServiceException,
GenerateAssistantResponseCommandOutput,
} from '@amzn/codewhisperer-streaming'
} from '@amzn/amazon-codewhisperer-streaming'
import { Session } from '../../session/session'
import { CodeReference } from '../../../../amazonq/webview/ui/apps/amazonqCommonsConnector'
import { getHttpStatusCode, getRequestId, getTelemetryReasonDesc, ToolkitError } from '../../../../shared/errors'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
SupplementaryWebLink,
Reference,
UserIntent,
} from '@amzn/codewhisperer-streaming'
} from '@amzn/amazon-codewhisperer-streaming'

import {
GenerateResourceRequestMessage,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/codewhisperer/service/testGenHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { createCodeWhispererChatStreamingClient } from '../../shared/clients/cod
import { downloadExportResultArchive } from '../../shared/utilities/download'
import AdmZip from 'adm-zip'
import path from 'path'
import { ExportIntent } from '@amzn/codewhisperer-streaming'
import { ExportIntent } from '@amzn/amazon-codewhisperer-streaming'
import { glob } from 'glob'

// TODO: Get TestFileName and Framework and to error message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { JobStoppedError, ZipExceedsSizeLimitError } from '../../../amazonqGumby
import { writeLogs } from './transformFileHandler'
import { createCodeWhispererChatStreamingClient } from '../../../shared/clients/codewhispererChatClient'
import { downloadExportResultArchive } from '../../../shared/utilities/download'
import { ExportIntent, TransformationDownloadArtifactType } from '@amzn/codewhisperer-streaming'
import { ExportIntent, TransformationDownloadArtifactType } from '@amzn/amazon-codewhisperer-streaming'
import fs from '../../../shared/fs/fs'
import { ChatSessionManager } from '../../../amazonqGumby/chat/storages/chatSession'
import { encodeHTML } from '../../../shared/utilities/textUtilities'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import fs from 'fs' // eslint-disable-line no-restricted-imports
import { parsePatch, applyPatches, ParsedDiff } from 'diff'
import path from 'path'
import vscode from 'vscode'
import { ExportIntent } from '@amzn/codewhisperer-streaming'
import { ExportIntent } from '@amzn/amazon-codewhisperer-streaming'
import {
TransformByQReviewStatus,
transformByQState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
*/

import { SendMessageCommandOutput, SendMessageRequest } from '@amzn/amazon-q-developer-streaming-client'
import { GenerateAssistantResponseCommandOutput, GenerateAssistantResponseRequest } from '@amzn/codewhisperer-streaming'
import {
GenerateAssistantResponseCommandOutput,
GenerateAssistantResponseRequest,
} from '@amzn/amazon-codewhisperer-streaming'
import * as vscode from 'vscode'
import { ToolkitError } from '../../../../shared/errors'
import { createCodeWhispererChatStreamingClient } from '../../../../shared/clients/codewhispererChatClient'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
RelevantTextDocument,
SymbolType,
TextDocument,
} from '@amzn/codewhisperer-streaming'
} from '@amzn/amazon-codewhisperer-streaming'
import { ChatTriggerType, TriggerPayload } from '../model'
import { undefinedIfEmpty } from '../../../../shared'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { EditorContextCommand } from '../../commands/registerCommands'
import { PromptsGenerator } from './prompts/promptsGenerator'
import { TriggerEventsStorage } from '../../storages/triggerEvents'
import { SendMessageRequest } from '@amzn/amazon-q-developer-streaming-client'
import { CodeWhispererStreamingServiceException } from '@amzn/codewhisperer-streaming'
import { CodeWhispererStreamingServiceException } from '@amzn/amazon-codewhisperer-streaming'
import { UserIntentRecognizer } from './userIntent/userIntentRecognizer'
import { CWCTelemetryHelper, recordTelemetryChatRunCommand } from './telemetryHelper'
import { CodeWhispererTracker } from '../../../codewhisperer/tracker/codewhispererTracker'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
ChatResponseStream as cwChatResponseStream,
CodeWhispererStreamingServiceException,
SupplementaryWebLink,
} from '@amzn/codewhisperer-streaming'
} from '@amzn/amazon-codewhisperer-streaming'
import { ChatMessage, ErrorMessage, FollowUp, Suggestion } from '../../../view/connector/connector'
import { ChatSession } from '../../../clients/chat/v0/chat'
import { ChatException } from './model'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import * as vscode from 'vscode'
import { RelevantTextDocument, UserIntent } from '@amzn/codewhisperer-streaming'
import { RelevantTextDocument, UserIntent } from '@amzn/amazon-codewhisperer-streaming'
import { MatchPolicy, CodeQuery } from '../../clients/chat/v0/model'
import { Selection } from 'vscode'
import { TabOpenType } from '../../../amazonq/webview/ui/storages/tabsStorage'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import { UserIntent } from '@amzn/codewhisperer-streaming'
import { UserIntent } from '@amzn/amazon-codewhisperer-streaming'
import {
AmazonqAddMessage,
AmazonqInteractWithMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { UserIntent } from '@amzn/codewhisperer-streaming'
import { UserIntent } from '@amzn/amazon-codewhisperer-streaming'
import { EditorContextCommand } from '../../../commands/registerCommands'
import { PromptMessage } from '../model'
import { Auth } from '../../../../auth'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import { CodeWhispererStreaming } from '@amzn/codewhisperer-streaming'
import { CodeWhispererStreaming } from '@amzn/amazon-codewhisperer-streaming'
import { ConfiguredRetryStrategy } from '@smithy/util-retry'
import { getCodewhispererConfig } from '../../codewhisperer/client/codewhisperer'
import { AuthUtil } from '../../codewhisperer/util/authUtil'
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/shared/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { CancellationError } from './utilities/timeoutUtils'
import { hasKey, isNonNullable } from './utilities/tsUtils'
import type * as nodefs from 'fs' // eslint-disable-line no-restricted-imports
import type * as os from 'os'
import { CodeWhispererStreamingServiceException } from '@amzn/codewhisperer-streaming'
import { CodeWhispererStreamingServiceException } from '@amzn/amazon-codewhisperer-streaming'
import { driveLetterRegex } from './utilities/pathUtils'
import { getLogger } from './logger/logger'
import { crashMonitoringDirName } from './constants'
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/shared/utilities/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { CodeWhispererStreaming, ExportResultArchiveCommandInput } from '@amzn/codewhisperer-streaming'
import { CodeWhispererStreaming, ExportResultArchiveCommandInput } from '@amzn/amazon-codewhisperer-streaming'
import { ToolkitError } from '../errors'
import fs from '../fs/fs'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
import assert from 'assert'
import { WorkspaceFolder } from 'vscode'
import { ExportResultArchiveCommandInput } from '@amzn/codewhisperer-streaming'
import { ExportResultArchiveCommandInput } from '@amzn/amazon-codewhisperer-streaming'
import * as sinon from 'sinon'
import path from 'path'
import { fs, getRandomString } from '../../shared'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading
Loading