Skip to content

Commit ef4e872

Browse files
authored
Merge pull request aws#6824 from aws/autoMerge/feature/agentic-chat
Merge master into feature/agentic-chat
2 parents 00257c4 + 1b39420 commit ef4e872

File tree

144 files changed

+11655
-5145
lines changed

Some content is hidden

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

144 files changed

+11655
-5145
lines changed

.github/workflows/node.js.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ jobs:
126126
matrix:
127127
node-version: [18.x]
128128
vscode-version: [minimum, stable, insiders]
129+
package: [amazonq, toolkit]
129130
env:
130131
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
131132
NODE_OPTIONS: '--max-old-space-size=8192'
@@ -141,28 +142,17 @@ jobs:
141142
- name: Tests
142143
uses: coactions/setup-xvfb@v1
143144
with:
144-
run: npm test
145-
- name: Code coverage (Toolkit)
145+
run: npm run test -w packages/${{ matrix.package }}
146+
- name: Code coverage for ${{ matrix.package }}
146147
env:
147148
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
148149
NODE_OPTIONS: ''
149150
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
150151
uses: codecov/codecov-action@v5
151152
with:
152-
flags: macos-toolkit-unittests
153+
flags: macos-${{ matrix.package }}-unittests
153154
verbose: true
154-
file: ./coverage/toolkit/lcov.info
155-
token: ${{ secrets.CODECOV_TOKEN }}
156-
- name: Code coverage (Amazon Q)
157-
env:
158-
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
159-
NODE_OPTIONS: ''
160-
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
161-
uses: codecov/codecov-action@v5
162-
with:
163-
flags: macos-amazonq-unittests
164-
verbose: true
165-
file: ./coverage/amazonq/lcov.info
155+
file: ./coverage/${{ matrix.package }}/lcov.info
166156
token: ${{ secrets.CODECOV_TOKEN }}
167157

168158
web:
@@ -200,6 +190,7 @@ jobs:
200190
matrix:
201191
node-version: [18.x]
202192
vscode-version: [stable, insiders]
193+
package: [amazonq, toolkit]
203194
env:
204195
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
205196
NODE_OPTIONS: '--max-old-space-size=8192'
@@ -211,15 +202,15 @@ jobs:
211202
node-version: ${{ matrix.node-version }}
212203
- run: npm ci
213204
- name: Tests
214-
run: npm test
215-
- name: Code coverage
205+
run: npm run test -w packages/${{ matrix.package }}
206+
- name: Code coverage for ${{ matrix.package }}
216207
env:
217208
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
218209
NODE_OPTIONS: ''
219210
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
220211
uses: codecov/codecov-action@v5
221212
with:
222-
flags: windows-unittests
213+
flags: windows-${{ matrix.package }}-unittests
223214
verbose: true
224-
file: ./coverage/lcov.info
215+
file: ./coverage/${{ matrix.package }}/lcov.info
225216
token: ${{ secrets.CODECOV_TOKEN }}

CONTRIBUTING.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,32 @@ Example:
427427
}
428428
```
429429

430+
<a name="amazonqLsp-settings">Overrides specifically for the Amazon Q language server</a> can be set using the `aws.dev.amazonqLsp` setting. This is a JSON object consisting of keys/values required to override language server: `manifestUrl`, `supportedVersions`, `id`, and `path`.
431+
432+
Example:
433+
434+
```json
435+
"aws.dev.amazonqLsp": {
436+
"manifestUrl": "https://custom.url/manifest.json",
437+
"supportedVersions": "4.0.0",
438+
"id": "AmazonQ",
439+
"path": "/custom/path/to/local/lsp/folder",
440+
}
441+
```
442+
443+
<a name="amazonqWorkspaceLsp-settings">Overrides specifically for the Amazon Q Workspace Context language server</a> can be set using the `aws.dev.amazonqWorkspaceLsp` setting. This is a JSON object consisting of keys/values required to override language server: `manifestUrl`, `supportedVersions`, `id`, and `path`.
444+
445+
Example:
446+
447+
```json
448+
"aws.dev.amazonqWorkspaceLsp": {
449+
"manifestUrl": "https://custom.url/manifest.json",
450+
"supportedVersions": "4.0.0",
451+
"id": "AmazonQ",
452+
"path": "/custom/path/to/local/lsp/folder",
453+
}
454+
```
455+
430456
### Environment variables
431457

432458
Environment variables can be used to modify the behaviour of VSCode. The following are environment variables that can be used to configure the extension:
@@ -472,6 +498,14 @@ Unlike the user setting overrides, not all of these environment variables have t
472498

473499
- `__CODEWHISPERER_REGION`: for aws.dev.codewhispererService.region
474500
- `__CODEWHISPERER_ENDPOINT`: for aws.dev.codewhispererService.endpoint
501+
- `__AMAZONQLSP_MANIFEST_URL`: for aws.dev.amazonqLsp.manifestUrl
502+
- `__AMAZONQLSP_SUPPORTED_VERSIONS`: for aws.dev.amazonqLsp.supportedVersions
503+
- `__AMAZONQLSP_ID`: for aws.dev.amazonqLsp.id
504+
- `__AMAZONQLSP_PATH`: for aws.dev.amazonqWorkspaceLsp.locationOverride
505+
- `__AMAZONQWORKSPACELSP_MANIFEST_URL`: for aws.dev.amazonqWorkspaceLsp.manifestUrl
506+
- `__AMAZONQWORKSPACELSP_SUPPORTED_VERSIONS`: for aws.dev.amazonqWorkspaceLsp.supportedVersions
507+
- `__AMAZONQWORKSPACELSP_ID`: for aws.dev.amazonqWorkspaceLsp.id
508+
- `__AMAZONQWORKSPACELSP_PATH`: for aws.dev.amazonqWorkspaceLsp.locationOverride
475509

476510
#### Lambda
477511

docs/TEST_E2E.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,27 @@ With this approach, the follow things can be tested:
1717
- Whether or not certain features show/not show depending on the status of the users auth
1818
- Run requests directly against the backend and see if we get results back
1919
- Clicking any follow up buttons (including examples)
20+
21+
## Flare Chat E2E Test flow (Not implemented yet)
22+
23+
This is the new flow that should be introduced when we moved to Flare chat.
24+
25+
```mermaid
26+
sequenceDiagram
27+
participant test as Test
28+
participant framework as Test Framework
29+
participant ui as Virtual DOM
30+
participant lsp as Language Server
31+
participant mynah as Mynah UI
32+
33+
test->>test: starts
34+
test->>framework: creates test framework
35+
framework->>ui: adds mynah ui to virtual dom
36+
test->>lsp: waits for language server activation
37+
test->>mynah: triggers action on mynah ui
38+
mynah->>framework: sends message
39+
framework->>lsp: sends message
40+
lsp->>framework: gets response
41+
framework->>ui: displays response
42+
test->>ui: assert test expectations
43+
```

docs/lsp.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Flare Language Server
2+
3+
## Chat Activation flow
4+
5+
```mermaid
6+
sequenceDiagram
7+
participant user as User
8+
participant ext as Extension
9+
participant webview as Chat Webview
10+
participant flare as Amazon Q LSP
11+
participant backend as Amazon Q Backend
12+
13+
user->>ext: opens IDE
14+
ext->>ext: activates
15+
ext->>webview: loads UI
16+
ext->>flare: initialize process
17+
flare->>flare: starts and waits
18+
user->>webview: interacts
19+
webview->>ext: sends message
20+
ext->>flare: sends message
21+
flare->>backend: call api
22+
backend->>flare: returns
23+
flare->>ext: display
24+
ext->>webview: display
25+
```
26+
27+
## Language Server Debugging
28+
29+
1. Clone https://github.com/aws/language-servers.git and set it up in the same workspace as this project
30+
31+
e.g.
32+
33+
```
34+
/aws-toolkit-vscode
35+
/toolkit
36+
/core
37+
/amazonq
38+
/language-servers
39+
```
40+
41+
2. Inside of the language-servers project run:
42+
```
43+
npm install
44+
npm run compile
45+
npm run package
46+
```
47+
to get the project setup
48+
3. Uncomment the `__AMAZONQLSP_PATH` variable in `amazonq/.vscode/launch.json` Extension configuration
49+
4. Use the `Launch LSP with Debugging` configuration and set breakpoints in VSCode or the language server
50+
51+
## Amazon Q Inline Activation
52+
53+
- In order to get inline completion working you must open a supported file type defined in CodewhispererInlineCompletionLanguages in `packages/amazonq/src/app/inline/completion.ts`

0 commit comments

Comments
 (0)