Skip to content

Commit d9e1a61

Browse files
authored
Merge branch 'aws:master' into feature/utg
2 parents 2f32ab3 + 1990349 commit d9e1a61

File tree

48 files changed

+480
-1080
lines changed

Some content is hidden

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

48 files changed

+480
-1080
lines changed

package-lock.json

Lines changed: 11 additions & 10 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
@@ -39,7 +39,7 @@
3939
"generateNonCodeFiles": "npm run generateNonCodeFiles -w packages/ --if-present"
4040
},
4141
"devDependencies": {
42-
"@aws-toolkits/telemetry": "^1.0.250",
42+
"@aws-toolkits/telemetry": "^1.0.254",
4343
"@playwright/browser-chromium": "^1.43.1",
4444
"@types/vscode": "^1.68.0",
4545
"@types/vscode-webview": "^1.57.1",
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"date": "2024-09-12",
3+
"version": "1.25.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Amazon Q Chat: Fixed inline code blocks are not vertically aligned with texts"
8+
},
9+
{
10+
"type": "Feature",
11+
"description": "Record telemetry event when AWS Toolkits extension is uninstalled."
12+
},
13+
{
14+
"type": "Feature",
15+
"description": "Improve workspace indexing by only index files that are changed since last indexing"
16+
},
17+
{
18+
"type": "Removal",
19+
"description": "Amazon Q Feature dev: Remove approach generation flow"
20+
}
21+
]
22+
}

packages/amazonq/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 1.25.0 2024-09-12
2+
3+
- **Bug Fix** Amazon Q Chat: Fixed inline code blocks are not vertically aligned with texts
4+
- **Feature** Record telemetry event when AWS Toolkits extension is uninstalled.
5+
- **Feature** Improve workspace indexing by only index files that are changed since last indexing
6+
- **Removal** Amazon Q Feature dev: Remove approach generation flow
7+
18
## 1.24.0 2024-09-05
29

310
- **Bug Fix** Network errors causing premature SSO logout

packages/amazonq/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "amazon-q-vscode",
33
"displayName": "Amazon Q",
44
"description": "Amazon Q is your generative AI-powered assistant across the software development lifecycle.",
5-
"version": "1.25.0-SNAPSHOT",
5+
"version": "1.26.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],

packages/amazonq/src/extension.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import {
3939
messages,
4040
placeholder,
4141
setContext,
42+
setupUninstallHandler,
4243
} from 'aws-core-vscode/shared'
4344
import { ExtStartUpSources, telemetry } from 'aws-core-vscode/telemetry'
4445
import { VSCODE_EXTENSION_ID } from 'aws-core-vscode/utils'
@@ -129,6 +130,9 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
129130
// Amazon Q specific commands
130131
registerCommands(context)
131132

133+
// Handle Amazon Q Extension un-installation.
134+
setupUninstallHandler(VSCODE_EXTENSION_ID.amazonq, context)
135+
132136
// Hide the Amazon Q tree in toolkit explorer
133137
await setContext('aws.toolkit.amazonq.dismissed', true)
134138

packages/amazonq/test/unit/amazonqFeatureDev/session/session.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ describe('session', () => {
6161

6262
const uploadID = '789'
6363
const tabID = '123'
64-
const testApproach = 'test-approach'
6564
const workspaceFolders = [controllerSetup.workspaceFolder] as CurrentWsFolders
6665
workspaceFolderUriFsPath = controllerSetup.workspaceFolder.uri.fsPath
6766
uri = generateVirtualMemoryUri(uploadID, notRejectedFileName)
@@ -76,7 +75,6 @@ describe('session', () => {
7675

7776
const codeGenState = new CodeGenState(
7877
testConfig,
79-
testApproach,
8078
[
8179
{
8280
zipFilePath: notRejectedFileName,

packages/amazonq/test/unit/codewhisperer/util/editorContext.test.ts

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,23 @@
22
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
5-
65
import assert from 'assert'
76
import * as codewhispererClient from 'aws-core-vscode/codewhisperer'
87
import * as EditorContext from 'aws-core-vscode/codewhisperer'
9-
import { createMockTextEditor, createMockClientRequest, resetCodeWhispererGlobalVariables } from 'aws-core-vscode/test'
8+
import {
9+
createMockTextEditor,
10+
createMockClientRequest,
11+
resetCodeWhispererGlobalVariables,
12+
openATextEditorWithText,
13+
createTestWorkspaceFolder,
14+
closeAllEditors,
15+
} from 'aws-core-vscode/test'
1016
import { globals } from 'aws-core-vscode/shared'
1117
import { GenerateCompletionsRequest } from 'aws-core-vscode/codewhisperer'
1218

1319
describe('editorContext', function () {
1420
let telemetryEnabledDefault: boolean
21+
let tempFolder: string
1522

1623
beforeEach(async function () {
1724
await resetCodeWhispererGlobalVariables()
@@ -66,15 +73,19 @@ describe('editorContext', function () {
6673
assert.strictEqual(actual, expected)
6774
})
6875

69-
it('Should return expected filename for a long filename', function () {
76+
it('Should return expected filename for a long filename', async function () {
7077
const editor = createMockTextEditor('', 'a'.repeat(1500), 'python', 1, 17)
7178
const actual = EditorContext.getFileName(editor)
7279
const expected = 'a'.repeat(1024)
7380
assert.strictEqual(actual, expected)
7481
})
7582
})
7683

77-
describe('getfileNameForRequest', function () {
84+
describe('getFileRelativePath', function () {
85+
this.beforeEach(async function () {
86+
tempFolder = (await createTestWorkspaceFolder()).uri.fsPath
87+
})
88+
7889
it('Should return a new filename with correct extension given a .ipynb file', function () {
7990
const languageToExtension = new Map<string, string>([
8091
['python', 'py'],
@@ -86,11 +97,22 @@ describe('editorContext', function () {
8697

8798
languageToExtension.forEach((extension, language) => {
8899
const editor = createMockTextEditor('', 'test.ipynb', language, 1, 17)
89-
const actual = EditorContext.getFileNameForRequest(editor)
100+
const actual = EditorContext.getFileRelativePath(editor)
90101
const expected = 'test.' + extension
91102
assert.strictEqual(actual, expected)
92103
})
93104
})
105+
106+
it('Should return relative path', async function () {
107+
const editor = await openATextEditorWithText('tttt', 'test.py', tempFolder)
108+
const actual = EditorContext.getFileRelativePath(editor)
109+
const expected = 'test.py'
110+
assert.strictEqual(actual, expected)
111+
})
112+
113+
afterEach(async function () {
114+
await closeAllEditors()
115+
})
94116
})
95117

96118
describe('validateRequest', function () {

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4115,7 +4115,7 @@
41154115
"@aws-sdk/property-provider": "3.46.0",
41164116
"@aws-sdk/smithy-client": "^3.46.0",
41174117
"@aws-sdk/util-arn-parser": "^3.46.0",
4118-
"@aws/mynah-ui": "^4.15.8",
4118+
"@aws/mynah-ui": "^4.15.9",
41194119
"@gerhobbelt/gitignore-parser": "^0.2.0-9",
41204120
"@iarna/toml": "^2.2.5",
41214121
"@smithy/middleware-retry": "^2.3.1",

packages/core/package.nls.json

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,8 @@
272272
"AWS.amazonq.featureDev.error.prepareRepoFailedError": "Sorry, I ran into an issue while trying to upload your code. Please try again.",
273273
"AWS.amazonq.featureDev.error.promptRefusalException": "I'm sorry, I can't generate code for your request. Please make sure your message and code files comply with the <a href=\"https://aws.amazon.com/machine-learning/responsible-ai/policy/\">AWS Responsible AI Policy.</a>",
274274
"AWS.amazonq.featureDev.error.zipFileError": "The zip file is corrupted",
275-
"AWS.amazonq.featureDev.error.planIterationLimitError": "Sorry, you've reached the quota for number of iterations on an implementation plan. You can generate code for this task or discuss a new plan. For more information on quotas, see the <a href=\"https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/software-dev.html#quotas\">Amazon Q Developer documentation</a>.",
276275
"AWS.amazonq.featureDev.error.codeIterationLimitError": "Sorry, you've reached the quota for number of iterations on code generation. You can insert this code in your files or discuss a new plan. For more information on quotas, see the <a href=\"https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/software-dev.html#quotas\" target=\"_blank\">Amazon Q Developer documentation.</a>",
277276
"AWS.amazonq.featureDev.error.tabIdNotFoundError": "I'm sorry, I'm having technical difficulties at the moment. Please try again.",
278-
"AWS.amazonq.featureDev.error.approachPhase.denyListedError": "I'm sorry, I'm having trouble generating a plan. Please try again.",
279-
"AWS.amazonq.featureDev.error.approachPhase.default": "I'm sorry, I ran into an issue while trying to approach the problem. Please try again.",
280277
"AWS.amazonq.featureDev.error.codeGen.denyListedError": "I'm sorry, I'm having trouble generating your code and can't continue at the moment. Please try again later, and share feedback to help me improve.",
281278
"AWS.amazonq.featureDev.error.codeGen.default": "I'm sorry, I ran into an issue while trying to generate your code. Please try again.",
282279
"AWS.amazonq.featureDev.error.codeGen.timeout": "Code generation did not finish within the expected time",
@@ -287,35 +284,34 @@
287284
"AWS.amazonq.featureDev.error.technicalDifficulties": "I'm sorry, I'm having technical difficulties and can't continue at the moment. Please try again later, and share feedback to help me improve.",
288285
"AWS.amazonq.featureDev.error.throttling": "I'm sorry, I'm experiencing high demand at the moment and can't generate your code. This attempt won't count toward usage limits. Please try again.",
289286
"AWS.amazonq.featureDev.error.submitFeedback": "'submitFeedback' command was called programmatically, but its not registered.",
290-
"AWS.amazonq.featureDev.error.approachNewTab": "There has been a problem generating an approach. Please open a conversation in a new tab",
291-
"AWS.amazonq.featureDev.pillText.awaitMessage": "This may take a few minutes. I will send a notification when it's complete if you navigate away from this panel, but please keep the tab open.",
287+
"AWS.amazonq.featureDev.pillText.awaitMessage": "Okay, I'll generate code for that.\n\nThis might take a few minutes. You can navigate away from this chat, but please keep this tab open. I'll notify you when I'm done.",
288+
"AWS.amazonq.featureDev.pillText.awaitMessageRetry": "Okay, I'll generate new code.\n\nThis might take a few minutes. You can navigate away from this chat, but please keep this tab open. I'll notify you when I'm done.",
292289
"AWS.amazonq.featureDev.pillText.modifyDefaultSourceFolder": "Choose another folder in your workspace",
293-
"AWS.amazonq.featureDev.pillText.newPlan": "Discuss a new plan",
294-
"AWS.amazonq.featureDev.pillText.newTask": "Work on new task",
290+
"AWS.amazonq.featureDev.pillText.newTask": "Yes, I have another task",
295291
"AWS.amazonq.featureDev.pillText.generateCode": "Generate code",
292+
"AWS.amazonq.featureDev.pillText.uploadingCode": "Uploading code ...",
293+
"AWS.amazonq.featureDev.pillText.contextGatheringCompleted": "Gathering context...",
296294
"AWS.amazonq.featureDev.pillText.generatingCode": "Generating code ...",
297-
"AWS.amazonq.featureDev.pillText.generatingPlan": "Generating plan ...",
298295
"AWS.amazonq.featureDev.pillText.requestingChanges": "Requesting changes ...",
299296
"AWS.amazonq.featureDev.pillText.insertCode": "Insert code",
300297
"AWS.amazonq.featureDev.pillText.sendFeedback": "Send feedback",
301298
"AWS.amazonq.featureDev.pillText.selectFiles": "Select files for context",
302299
"AWS.amazonq.featureDev.pillText.retry": "Retry",
303300
"AWS.amazonq.featureDev.pillText.writeNewPrompt": "Write a new prompt",
304301
"AWS.amazonq.featureDev.pillText.reauthenticate": "Follow instructions to re-authenticate ...",
305-
"AWS.amazonq.featureDev.pillText.closeSession": "Close session",
302+
"AWS.amazonq.featureDev.pillText.closeSession": "No, thanks",
306303
"AWS.amazonq.featureDev.pillText.selectOption": "Select an option above to proceed",
307304
"AWS.amazonq.featureDev.pillText.unableGenerateChanges": "Unable to generate any file changes",
308305
"AWS.amazonq.featureDev.pillText.provideFeedback": "Provide feedback to regenerate",
309306
"AWS.amazonq.featureDev.answer.generateSuggestion": "Would you like to generate a suggestion for this? You’ll review a file diff before inserting into your project.",
310-
"AWS.amazonq.featureDev.answer.howPlanCanBeImproved": "How can this plan be improved?",
311307
"AWS.amazonq.featureDev.answer.qGeneratedCode": "The Amazon Q Developer Agent for software development has generated code for you to review",
312-
"AWS.amazonq.featureDev.answer.howCodeCanBeImproved": "How can the code be improved?",
313-
"AWS.amazonq.featureDev.answer.approachCreation": "Ok, let me create a plan. This may take a few minutes.",
314-
"AWS.amazonq.featureDev.answer.updateCode": "Code has been updated. Would you like to work on another task?",
315-
"AWS.amazonq.featureDev.answer.sessionClosed": "Your session is now closed.",
316-
"AWS.amazonq.featureDev.answer.newTaskChanges": "What change would you like to make?",
308+
"AWS.amazonq.featureDev.answer.howCodeCanBeImproved": "How can I improve the code for your use case?",
309+
"AWS.amazonq.featureDev.answer.updateCode": "Okay, I updated your code files. Would you like to work on another task?",
310+
"AWS.amazonq.featureDev.answer.sessionClosed": "Okay, I've ended this chat session. You can open a new tab to chat or start another workflow.",
311+
"AWS.amazonq.featureDev.answer.newTaskChanges": "What new task would you like to work on?",
317312
"AWS.amazonq.featureDev.placeholder.chatInputDisabled": "Chat input is disabled",
318313
"AWS.amazonq.featureDev.placeholder.additionalImprovements": "Provide input on additional improvements",
319314
"AWS.amazonq.featureDev.placeholder.feedback": "Feedback, comments ...",
320-
"AWS.amazonq.featureDev.placeholder.describe": "Describe your task or issue in as much detail as possible"
315+
"AWS.amazonq.featureDev.placeholder.describe": "Describe your task or issue in as much detail as possible",
316+
"AWS.amazonq.featureDev.placeholder.sessionClosed": "Open a new chat tab to continue"
321317
}

0 commit comments

Comments
 (0)