Skip to content

Commit 659e292

Browse files
authored
Merge pull request #5177 from hayemaxi/feature/separate-sessions
Merge master into feature/separate-sessions
2 parents ef74cea + 49fde2a commit 659e292

File tree

154 files changed

+2050
-993
lines changed

Some content is hidden

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

154 files changed

+2050
-993
lines changed

docs/web.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,17 @@ do the following:
6262

6363
Now when you run the extension in the browser it will do CORS checks.
6464

65+
## Running in [vscode.dev](https://vscode.dev)
66+
67+
The following will explain how to get your latest local development changes running in the actual `vscode.dev`. Use this if you want to test on an actual VS Code Web instance.
68+
69+
1. Build the extension. We need the Web mode entrypoint file to exist.
70+
2. OPTIONAL: Start up your browser with security disabled. Certain functionalities do not support CORS and will fail otherwise.
71+
- On MacOS from the CLI is similar to `/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security`
72+
3. `cd` to the extension you want to test in `packages/`. Eg: `packages/amazonq/`.
73+
- We need to do this since the following command hosts your build from the `cwd`.
74+
4. Follow the [VS Code documentation](https://code.visualstudio.com/api/extension-guides/web-extensions#test-your-web-extension-in-vscode.dev) for setting up certs, serving your the latest changes, and installing the extension to `vscode.dev`.
75+
6576
## Testing in VSCode Web Mode
6677

6778
The following steps will result in a VSCode Extension window running

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: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"date": "2024-06-14",
3+
"version": "1.9.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Amazon Q inline suggestions: remember `Pause Auto-Suggestions` after IDE restart"
8+
},
9+
{
10+
"type": "Bug Fix",
11+
"description": "Amazon Q /dev command: stop showing spinner when there is an error."
12+
},
13+
{
14+
"type": "Bug Fix",
15+
"description": "Security Scan: Fixes an issue where auto-scans cause the editor to become unresponsive for larger projects."
16+
},
17+
{
18+
"type": "Bug Fix",
19+
"description": "Fix(Amazon Q Code Transformation): show more detailed error messages for proxy issues"
20+
},
21+
{
22+
"type": "Feature",
23+
"description": "Amazon Q Code Transform: Allow user to view transformation build log"
24+
}
25+
]
26+
}

packages/amazonq/.changes/next-release/Bug Fix-17572ed1-4601-4554-9144-9eb5143bf0ff.json

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

packages/amazonq/.vscode/launch.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,43 @@
4646
"preLaunchTask": "webRun",
4747
"postDebugTask": "webRunTerminate"
4848
},
49+
{
50+
"name": "Extension Tests",
51+
"type": "extensionHost",
52+
"request": "launch",
53+
"runtimeExecutable": "${execPath}",
54+
"args": [
55+
"--disable-extensions",
56+
"--extensionDevelopmentPath=${workspaceFolder}",
57+
"--extensionTestsPath=${workspaceFolder}/dist/test/unit/index",
58+
"${workspaceFolder}/../core/dist/src/testFixtures/workspaceFolder"
59+
],
60+
"env": {
61+
"DEVELOPMENT_PATH": "${workspaceFolder}",
62+
"AWS_TOOLKIT_AUTOMATION": "local"
63+
},
64+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
65+
"preLaunchTask": "watch"
66+
},
67+
{
68+
"name": "Extension Tests (current file)",
69+
"type": "extensionHost",
70+
"request": "launch",
71+
"runtimeExecutable": "${execPath}",
72+
"args": [
73+
"--disable-extensions",
74+
"--extensionDevelopmentPath=${workspaceFolder}",
75+
"--extensionTestsPath=${workspaceFolder}/dist/test/unit/index",
76+
"${workspaceFolder}/../core/dist/src/testFixtures/workspaceFolder"
77+
],
78+
"env": {
79+
"TEST_FILE": "${relativeFile}",
80+
"DEVELOPMENT_PATH": "${workspaceFolder}",
81+
"AWS_TOOLKIT_AUTOMATION": "local"
82+
},
83+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
84+
"preLaunchTask": "watch"
85+
},
4986
{
5087
"name": "E2E Test (current file)",
5188
"type": "extensionHost",

packages/amazonq/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 1.9.0 2024-06-14
2+
3+
- **Bug Fix** Amazon Q inline suggestions: remember `Pause Auto-Suggestions` after IDE restart
4+
- **Bug Fix** Amazon Q /dev command: stop showing spinner when there is an error.
5+
- **Bug Fix** Security Scan: Fixes an issue where auto-scans cause the editor to become unresponsive for larger projects.
6+
- **Bug Fix** Fix(Amazon Q Code Transformation): show more detailed error messages for proxy issues
7+
- **Feature** Amazon Q Code Transform: Allow user to view transformation build log
8+
19
## 1.8.0 2024-06-07
210

311
- **Bug Fix** fix(featureDev): fix file rejection for multi-workspaces

packages/amazonq/package.json

Lines changed: 18 additions & 11 deletions
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.9.0-SNAPSHOT",
5+
"version": "1.10.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],
@@ -59,6 +59,7 @@
5959
"lint": "echo 'Nothing to lint yet!'",
6060
"watch": "npm run clean && npm run buildScripts && tsc -watch -p ./",
6161
"testCompile": "npm run clean && npm run buildScripts && npm run compileOnly",
62+
"test": "npm run testCompile && c8 ts-node ../core/scripts/test/test.ts dist/test/unit/index.js ../core/dist/src/testFixtures/workspaceFolder",
6263
"testE2E": "npm run testCompile && c8 ts-node ../core/scripts/test/testE2E.ts dist/test/e2e/index.js",
6364
"webRun": "npx @vscode/test-web --open-devtools --browserOption=--disable-web-security --waitForDebugger=9222 --extensionDevelopmentPath=. .",
6465
"webWatch": "npm run clean && npm run buildScripts && webpack --mode development --watch",
@@ -685,6 +686,17 @@
685686
"title": "Meet Amazon Q",
686687
"description": "Your generative AI-powered assistant across the software development lifecycle.",
687688
"steps": [
689+
{
690+
"id": "aws.amazonq.walkthrough.inlineSuggestions",
691+
"title": "Get inline code suggestions",
692+
"description": "Amazon Q suggests code as you type based on your open files. Accepted suggestions from licensed code will go into the Code Reference Log.\n\n[Try Example](command:_aws.amazonq.walkthrough.inlineSuggestionsExample)\n\n**TIP: Invoke manually with opt/alt + c**",
693+
"media": {
694+
"markdown": "./resources/walkthrough/amazonq/inline.md"
695+
},
696+
"completionEvents": [
697+
"onCommand:_aws.amazonq.walkthrough.inlineSuggestionsExample"
698+
]
699+
},
688700
{
689701
"id": "aws.amazonq.walkthrough.chat",
690702
"title": "Ask using chat",
@@ -694,21 +706,16 @@
694706
},
695707
"completionEvents": []
696708
},
697-
{
698-
"id": "aws.amazonq.walkthrough.inlineSuggestions",
699-
"title": "Get inline code suggestions",
700-
"description": "Amazon Q suggests code as you type based on your open files. Accepted suggestions from licensed code will go into the Code Reference Log.\n\n[Try inline code examples](command:aws.amazonq.gettingStarted)\n\n**TIP: Invoke manually with opt/alt + c**",
701-
"media": {
702-
"markdown": "./resources/walkthrough/amazonq/inline.md"
703-
}
704-
},
705709
{
706710
"id": "aws.amazonq.walkthrough.securityScan",
707711
"title": "Check for security vulnerabilities",
708-
"description": "Amazon Q scans your code to identify security vulnerabilities and suggests fixes.\n\nStart a scan from the status bar menu.\n\n**TIP: identifies vulnerabilities in Python, Typescript, Ruby, AWS CDK, and more**",
712+
"description": "Amazon Q scans your code to identify security vulnerabilities and suggests fixes.\n\nStart a scan from the status bar menu.\n\n[Scan your current project](command:_aws.amazonq.walkthrough.securityScanExample)\n\nIdentifies vulnerabilities in Python, Typescript, Ruby, AWS CDK, and [more](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/q-language-ide-support.html#security-scans-language-support)",
709713
"media": {
710714
"markdown": "./resources/walkthrough/amazonq/scans.md"
711-
}
715+
},
716+
"completionEvents": [
717+
"onCommand:_aws.amazonq.walkthrough.securityScanExample"
718+
]
712719
},
713720
{
714721
"id": "aws.amazonq.walkthrough.settings",

packages/amazonq/scripts/build/copyFiles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const tasks: CopyTask[] = [
3232

3333
{ target: path.join('../core', 'resources'), destination: path.join('..', 'resources') },
3434
{ target: path.join('../core', 'package.nls.json'), destination: path.join('..', 'package.nls.json') },
35+
{ target: 'test/unit/amazonqGumby/resources' },
3536

3637
// Vue
3738
{

packages/amazonq/src/extensionCommon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { initializeAuth, CredentialsStore, LoginManager, AuthUtils, SsoConnectio
3030
import { CommonAuthWebview } from 'aws-core-vscode/login'
3131
import { VSCODE_EXTENSION_ID } from 'aws-core-vscode/utils'
3232
import { telemetry, ExtStartUpSources } from 'aws-core-vscode/telemetry'
33-
import { makeEndpointsProvider, registerGenericCommands } from 'aws-core-vscode/common'
33+
import { makeEndpointsProvider, registerGenericCommands } from 'aws-core-vscode/extensionCommon'
3434
import { registerCommands } from './commands'
3535

3636
export const amazonQContextPrefix = 'amazonq'

packages/core/src/test/amazonq/apps/initContext.test.ts renamed to packages/amazonq/test/unit/amazonq/apps/initContext.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
*/
55

66
import { EventEmitter } from 'vscode'
7-
import { DefaultAmazonQAppInitContext } from '../../../amazonq/apps/initContext'
8-
import { MessagePublisher } from '../../../amazonq/messages/messagePublisher'
7+
import { DefaultAmazonQAppInitContext, MessagePublisher } from 'aws-core-vscode/amazonq'
98
import assert from 'assert'
109

1110
describe('DefaultAmazonQAppInitContext', () => {

0 commit comments

Comments
 (0)