Skip to content

Commit 4dbd3b4

Browse files
committed
Merge branch 'master' into sdkv3/startMigration
2 parents 89ef745 + b52666e commit 4dbd3b4

File tree

40 files changed

+624
-211
lines changed

40 files changed

+624
-211
lines changed
Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,86 @@
1-
# github actions: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-nodejs
2-
# setup-node: https://github.com/actions/setup-node
1+
# # github actions: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-nodejs
2+
# # setup-node: https://github.com/actions/setup-node
33

4-
name: Copy-Paste Detection
4+
# name: Copy-Paste Detection
55

6-
on:
7-
pull_request:
8-
branches: [master, feature/*, staging]
6+
# on:
7+
# pull_request:
8+
# branches: [master, feature/*, staging]
99

10-
jobs:
11-
jscpd:
12-
runs-on: ubuntu-latest
13-
strategy:
14-
matrix:
15-
node-version: [18.x]
16-
env:
17-
NODE_OPTIONS: '--max-old-space-size=8192'
10+
# jobs:
11+
# jscpd:
12+
# runs-on: ubuntu-latest
13+
# strategy:
14+
# matrix:
15+
# node-version: [18.x]
16+
# env:
17+
# NODE_OPTIONS: '--max-old-space-size=8192'
1818

19-
steps:
20-
- uses: actions/checkout@v4
21-
with:
22-
fetch-depth: 0
19+
# steps:
20+
# - uses: actions/checkout@v4
21+
# with:
22+
# fetch-depth: 0
2323

24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: ${{ matrix.node-version }}
24+
# - name: Use Node.js ${{ matrix.node-version }}
25+
# uses: actions/setup-node@v4
26+
# with:
27+
# node-version: ${{ matrix.node-version }}
2828

29-
- name: Fetch fork upstream
30-
run: |
31-
git remote add forkUpstream https://github.com/${{ github.event.pull_request.head.repo.full_name }} # URL of the fork
32-
git fetch forkUpstream # Fetch fork
29+
# - name: Fetch fork upstream
30+
# run: |
31+
# git remote add forkUpstream https://github.com/${{ github.event.pull_request.head.repo.full_name }} # URL of the fork
32+
# git fetch forkUpstream # Fetch fork
3333

34-
- name: Determine base and target branches for comparison.
35-
run: |
36-
echo "CURRENT_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
37-
echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
38-
- run: git diff --name-only origin/$TARGET_BRANCH forkUpstream/$CURRENT_BRANCH > diff_output.txt
39-
- run: |
40-
npm install -g jscpd
34+
# - name: Determine base and target branches for comparison.
35+
# run: |
36+
# echo "CURRENT_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
37+
# echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
38+
# - run: git diff --name-only origin/$TARGET_BRANCH forkUpstream/$CURRENT_BRANCH > diff_output.txt
39+
# - run: |
40+
# npm install -g jscpd
4141

42-
- run: jscpd --config "$GITHUB_WORKSPACE/.github/workflows/jscpd.json"
42+
# - run: jscpd --config "$GITHUB_WORKSPACE/.github/workflows/jscpd.json"
4343

44-
- if: always()
45-
uses: actions/upload-artifact@v4
46-
with:
47-
name: unfiltered-jscpd-report
48-
path: ./jscpd-report.json
44+
# - if: always()
45+
# uses: actions/upload-artifact@v4
46+
# with:
47+
# name: unfiltered-jscpd-report
48+
# path: ./jscpd-report.json
4949

50-
- name: Filter jscpd report for changed files
51-
run: |
52-
if [ ! -f ./jscpd-report.json ]; then
53-
echo "jscpd-report.json not found"
54-
exit 1
55-
fi
56-
echo "Filtering jscpd report for changed files..."
57-
CHANGED_FILES=$(jq -R -s -c 'split("\n")[:-1]' diff_output.txt)
58-
echo "Changed files: $CHANGED_FILES"
59-
jq --argjson changed_files "$CHANGED_FILES" '
60-
.duplicates | map(select(
61-
(.firstFile?.name as $fname | $changed_files | any(. == $fname)) or
62-
(.secondFile?.name as $sname | $changed_files | any(. == $sname))
63-
))
64-
' ./jscpd-report.json > filtered-jscpd-report.json
65-
cat filtered-jscpd-report.json
50+
# - name: Filter jscpd report for changed files
51+
# run: |
52+
# if [ ! -f ./jscpd-report.json ]; then
53+
# echo "jscpd-report.json not found"
54+
# exit 1
55+
# fi
56+
# echo "Filtering jscpd report for changed files..."
57+
# CHANGED_FILES=$(jq -R -s -c 'split("\n")[:-1]' diff_output.txt)
58+
# echo "Changed files: $CHANGED_FILES"
59+
# jq --argjson changed_files "$CHANGED_FILES" '
60+
# .duplicates | map(select(
61+
# (.firstFile?.name as $fname | $changed_files | any(. == $fname)) or
62+
# (.secondFile?.name as $sname | $changed_files | any(. == $sname))
63+
# ))
64+
# ' ./jscpd-report.json > filtered-jscpd-report.json
65+
# cat filtered-jscpd-report.json
6666

67-
- name: Check for duplicates
68-
run: |
69-
if [ $(wc -l < ./filtered-jscpd-report.json) -gt 1 ]; then
70-
echo "filtered_report_exists=true" >> $GITHUB_ENV
71-
else
72-
echo "filtered_report_exists=false" >> $GITHUB_ENV
73-
fi
74-
- name: upload filtered report (if applicable)
75-
if: env.filtered_report_exists == 'true'
76-
uses: actions/upload-artifact@v4
77-
with:
78-
name: filtered-jscpd-report
79-
path: ./filtered-jscpd-report.json
67+
# - name: Check for duplicates
68+
# run: |
69+
# if [ $(wc -l < ./filtered-jscpd-report.json) -gt 1 ]; then
70+
# echo "filtered_report_exists=true" >> $GITHUB_ENV
71+
# else
72+
# echo "filtered_report_exists=false" >> $GITHUB_ENV
73+
# fi
74+
# - name: upload filtered report (if applicable)
75+
# if: env.filtered_report_exists == 'true'
76+
# uses: actions/upload-artifact@v4
77+
# with:
78+
# name: filtered-jscpd-report
79+
# path: ./filtered-jscpd-report.json
8080

81-
- name: Fail and log found duplicates.
82-
if: env.filtered_report_exists == 'true'
83-
run: |
84-
cat ./filtered-jscpd-report.json
85-
echo "Duplications found, failing the check."
86-
exit 1
81+
# - name: Fail and log found duplicates.
82+
# if: env.filtered_report_exists == 'true'
83+
# run: |
84+
# cat ./filtered-jscpd-report.json
85+
# echo "Duplications found, failing the check."
86+
# exit 1

buildspec/release/35opengate.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 0.2
2+
3+
phases:
4+
install:
5+
runtime-versions:
6+
nodejs: 16
7+
8+
pre_build:
9+
commands:
10+
- STAGE_NAME=SourceWithGit
11+
- PIPELINE=$(echo $CODEBUILD_INITIATOR | sed -e 's/codepipeline\///')
12+
build:
13+
commands:
14+
- |
15+
aws codepipeline enable-stage-transition \
16+
--pipeline-name "$PIPELINE" \
17+
--stage-name "$STAGE_NAME" \
18+
--transition-type "Inbound"

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.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"date": "2024-11-27",
3+
"version": "1.38.0",
4+
"entries": [
5+
{
6+
"type": "Feature",
7+
"description": "Amazon Q /dev: support `Dockerfile` files"
8+
},
9+
{
10+
"type": "Feature",
11+
"description": "Introduce @workspace command to enhance context fetching for Chat"
12+
},
13+
{
14+
"type": "Feature",
15+
"description": "Feature(Amazon Q Code Transformation): allow users to view results in 5 smaller diffs"
16+
}
17+
]
18+
}

packages/amazonq/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.38.0 2024-11-27
2+
3+
- **Feature** Amazon Q /dev: support `Dockerfile` files
4+
- **Feature** Introduce @workspace command to enhance context fetching for Chat
5+
- **Feature** Feature(Amazon Q Code Transformation): allow users to view results in 5 smaller diffs
6+
17
## 1.37.0 2024-11-22
28

39
- **Bug Fix** Amazon Q Feature Dev: display limit reached error message

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.38.0-SNAPSHOT",
5+
"version": "1.39.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],

packages/amazonq/src/extensionNode.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Auth, AuthUtils, getTelemetryMetadataForConn, isAnySsoConnection } from
1818
import api from './api'
1919
import { activate as activateCWChat } from './app/chat/activation'
2020
import { beta } from 'aws-core-vscode/dev'
21-
import { activate as activateNotifications } from 'aws-core-vscode/notifications'
21+
import { activate as activateNotifications, NotificationsController } from 'aws-core-vscode/notifications'
2222
import { AuthState, AuthUtil } from 'aws-core-vscode/codewhisperer'
2323
import { telemetry, AuthUserState } from 'aws-core-vscode/telemetry'
2424

@@ -67,15 +67,14 @@ async function activateAmazonQNode(context: vscode.ExtensionContext) {
6767

6868
// TODO: Should probably emit for web as well.
6969
// Will the web metric look the same?
70-
const authState = await getAuthState()
7170
telemetry.auth_userState.emit({
7271
passive: true,
7372
result: 'Succeeded',
7473
source: AuthUtils.ExtensionUse.instance.sourceForTelemetry(),
75-
...authState,
74+
...(await getAuthState()),
7675
})
7776

78-
void activateNotifications(context, authState, getAuthState)
77+
void activateNotifications(context, getAuthState)
7978
}
8079

8180
async function getAuthState(): Promise<Omit<AuthUserState, 'source'>> {
@@ -122,13 +121,16 @@ async function setupDevMode(context: vscode.ExtensionContext) {
122121

123122
const devOptions: DevOptions = {
124123
context,
125-
auth: Auth.instance,
124+
auth: () => Auth.instance,
125+
notificationsController: () => NotificationsController.instance,
126126
menuOptions: [
127127
'editStorage',
128+
'resetState',
128129
'showEnvVars',
129130
'deleteSsoConnections',
130131
'expireSsoConnections',
131132
'editAuthConnections',
133+
'notificationsSend',
132134
'forceIdeCrash',
133135
],
134136
}

packages/core/package.nls.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"AWS.configuration.description.amazonq": "Amazon Q creates a code reference when you insert a code suggestion from Amazon Q that is similar to training data. When unchecked, Amazon Q will not show code suggestions that have code references. If you authenticate through IAM Identity Center, this setting is controlled by your Amazon Q administrator. [Learn More](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-reference.html)",
7575
"AWS.configuration.description.amazonq.shareContentWithAWS": "When checked, your content processed by Amazon Q may be used for service improvement (except for content processed for users with the Amazon Q Developer Pro Tier). Unchecking this box will cause AWS to delete any of your content used for that purpose. The information used to provide the Amazon Q service to you will not be affected. See the [Service Terms](https://aws.amazon.com/service-terms) for more details.",
7676
"AWS.configuration.description.amazonq.importRecommendation": "Amazon Q will add import statements with inline code suggestions when necessary.",
77-
"AWS.configuration.description.amazonq.workspaceIndex": "This feature is in BETA. When you add @workspace to your question in Amazon Q chat, Amazon Q will index your open workspace files locally to use as context for its response. Extra CPU usage is expected while indexing a workspace. This will not impact Amazon Q features or your IDE, but you may manage CPU usage by setting the number of local threads in 'Local Workspace Index Threads'.",
77+
"AWS.configuration.description.amazonq.workspaceIndex": "When you add @workspace to your question in Amazon Q chat, Amazon Q will index your open workspace files locally to use as context for its response. Extra CPU usage is expected while indexing a workspace. This will not impact Amazon Q features or your IDE, but you may manage CPU usage by setting the number of local threads in 'Local Workspace Index Threads'.",
7878
"AWS.configuration.description.amazonq.workspaceIndexWorkerThreads": "Number of worker threads of Amazon Q local index process. '0' will use the system default worker threads for balance performance. You may increase this number to more quickly index your workspace, but only up to your hardware's number of CPU cores. Please restart VS Code or reload the VS Code window after changing worker threads.",
7979
"AWS.configuration.description.amazonq.workspaceIndexUseGPU": "Enable GPU to help index your local workspace files. Only applies to Linux and Windows.",
8080
"AWS.configuration.description.amazonq.workspaceIndexMaxSize": "The maximum size of local workspace files to be indexed in MB",

packages/core/src/amazonq/webview/ui/tabs/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const workspaceCommand: QuickActionCommandGroup = {
1717
commands: [
1818
{
1919
command: '@workspace',
20-
description: '(BETA) Reference all code in workspace.',
20+
description: 'Reference all code in workspace.',
2121
},
2222
],
2323
}

packages/core/src/amazonqGumby/chat/controller/controller.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ import { getStringHash } from '../../../shared/utilities/textUtilities'
6262
import { getVersionData } from '../../../codewhisperer/service/transformByQ/transformMavenHandler'
6363
import AdmZip from 'adm-zip'
6464
import { AuthError } from '../../../auth/sso/server'
65-
import { isSelectiveTransformationReady } from '../../../dev/config'
6665

6766
// These events can be interactions within the chat,
6867
// or elsewhere in the IDE
@@ -424,18 +423,15 @@ export class GumbyController {
424423
result: MetadataResult.Pass,
425424
})
426425
this.messenger.sendSkipTestsSelectionMessage(skipTestsSelection, message.tabID)
427-
if (!isSelectiveTransformationReady) {
428-
// perform local build
429-
await this.validateBuildWithPromptOnError(message)
430-
} else {
431-
await this.messenger.sendOneOrMultipleDiffsPrompt(message.tabID)
432-
}
426+
await this.messenger.sendOneOrMultipleDiffsPrompt(message.tabID)
433427
}
434428

435429
private async handleOneOrMultipleDiffs(message: any) {
436430
const oneOrMultipleDiffsSelection = message.formSelectedValues['GumbyTransformOneOrMultipleDiffsForm']
437431
if (oneOrMultipleDiffsSelection === CodeWhispererConstants.multipleDiffsMessage) {
438432
transformByQState.setMultipleDiffs(true)
433+
} else {
434+
transformByQState.setMultipleDiffs(false)
439435
}
440436
this.messenger.sendOneOrMultipleDiffsMessage(oneOrMultipleDiffsSelection, message.tabID)
441437
// perform local build

0 commit comments

Comments
 (0)