Skip to content

Commit 7da6a1c

Browse files
authored
Merge branch 'master' into edits-as-completion
2 parents 1da9067 + 7902e03 commit 7da6a1c

File tree

23 files changed

+10758
-36
lines changed

23 files changed

+10758
-36
lines changed

.github/workflows/setup-release-candidate.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
run: |
3232
echo "BRANCH_NAME=release/rc-$(date +%Y%m%d)" >> $GITHUB_OUTPUT
3333
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Generate license attribution
38+
run: npm run scan-licenses
39+
3440
- name: Create RC Branch
3541
env:
3642
BRANCH_NAME: ${{ steps.branch-name.outputs.BRANCH_NAME }}
@@ -41,5 +47,9 @@ jobs:
4147
# Create RC branch from specified commit
4248
git checkout -b $BRANCH_NAME
4349
50+
# Add generated license files
51+
git add LICENSE-THIRD-PARTY
52+
git commit -m "Update third-party license attribution for $BRANCH_NAME"
53+
4454
# Push RC branch
4555
git push origin $BRANCH_NAME

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,6 @@ packages/*/resources/css/icons.css
5757

5858
# Created by `npm run webRun` when testing extension in web mode
5959
.vscode-test-web
60+
61+
# License scanning output
62+
licenses-full.json

LICENSE-THIRD-PARTY

Lines changed: 10428 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,22 @@ We want your feedback!
5656
- [File an issue](https://github.com/aws/aws-toolkit-vscode/issues/new?labels=bug&template=bug_report.md)
5757
- Or [send a pull request](CONTRIBUTING.md)!
5858

59+
## License Scanning
60+
61+
To generate license reports and attribution documents for third-party dependencies:
62+
63+
```bash
64+
npm run scan-licenses
65+
66+
# Or run directly
67+
./scripts/scan-licenses.sh
68+
```
69+
70+
This generates:
71+
72+
- `LICENSE-THIRD-PARTY` - Attribution document for distribution
73+
- `licenses-full.json` - Complete license data
74+
5975
## License
6076

6177
This project and the subprojects within **(AWS Toolkit for Visual Studio Code, Amazon Q for Visual Studio Code)** is distributed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"reset": "npm run clean && ts-node ./scripts/clean.ts node_modules && npm install",
3939
"generateNonCodeFiles": "npm run generateNonCodeFiles -w packages/ --if-present",
4040
"mergeReports": "ts-node ./scripts/mergeReports.ts",
41-
"skippedTestReport": "ts-node ./scripts/skippedTestReport.ts ./packages/amazonq/test/e2e/"
41+
"skippedTestReport": "ts-node ./scripts/skippedTestReport.ts ./packages/amazonq/test/e2e/",
42+
"scan-licenses": "ts-node ./scripts/scan-licenses.ts"
4243
},
4344
"devDependencies": {
4445
"@aws-toolkits/telemetry": "^1.0.329",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"date": "2025-10-02",
3+
"version": "1.98.0",
4+
"entries": []
5+
}

packages/amazonq/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.98.0 2025-10-02
2+
3+
- Miscellaneous non-user-facing changes
4+
15
## 1.97.0 2025-09-29
26

37
- Miscellaneous non-user-facing changes

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": "The most capable generative AI–powered assistant for software development.",
5-
"version": "1.98.0-SNAPSHOT",
5+
"version": "1.99.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],

packages/amazonq/src/app/inline/EditRendering/displayImage.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,11 @@ export class EditDecorationManager {
136136
newCode: string,
137137
originalCodeHighlightRanges: Array<{ line: number; start: number; end: number }>
138138
): Promise<void> {
139-
await this.clearDecorations(editor)
140-
141-
await setContext('aws.amazonq.editSuggestionActive' as any, true)
142-
EditSuggestionState.setEditSuggestionActive(true)
139+
// Clear old decorations but don't reset state (state is already set in displaySvgDecoration)
140+
editor.setDecorations(this.imageDecorationType, [])
141+
editor.setDecorations(this.removedCodeDecorationType, [])
142+
this.currentImageDecoration = undefined
143+
this.currentRemovedCodeDecorations = []
143144

144145
this.acceptHandler = onAccept
145146
this.rejectHandler = onReject
@@ -313,8 +314,16 @@ export async function displaySvgDecoration(
313314
) {
314315
const originalCode = editor.document.getText()
315316

317+
// Set edit state immediately to prevent race condition with completion requests
318+
await setContext('aws.amazonq.editSuggestionActive' as any, true)
319+
EditSuggestionState.setEditSuggestionActive(true)
320+
316321
// Check if a completion suggestion is currently active - if so, discard edit suggestion
317322
if (inlineCompletionProvider && (await inlineCompletionProvider.isCompletionActive())) {
323+
// Clean up state since we're not showing the edit
324+
await setContext('aws.amazonq.editSuggestionActive' as any, false)
325+
EditSuggestionState.setEditSuggestionActive(false)
326+
318327
// Emit DISCARD telemetry for edit suggestion that can't be shown due to active completion
319328
const params = createDiscardTelemetryParams(session, item)
320329
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
@@ -326,6 +335,10 @@ export async function displaySvgDecoration(
326335

327336
const isPatchValid = applyPatch(editor.document.getText(), item.insertText as string)
328337
if (!isPatchValid) {
338+
// Clean up state since we're not showing the edit
339+
await setContext('aws.amazonq.editSuggestionActive' as any, false)
340+
EditSuggestionState.setEditSuggestionActive(false)
341+
329342
const params = createDiscardTelemetryParams(session, item)
330343
// TODO: this session is closed on flare side hence discarded is not emitted in flare
331344
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)

0 commit comments

Comments
 (0)