Skip to content

Commit 02c3b99

Browse files
authored
docs(amazonq): Add documentation for Flare chat activation + e2e testing (#6775)
## Problem - missing diagrams for how the chat activation flow will work in flare - missing diagrams for how e2e test should work in flare ## Solution - add missing diagrams - remove lsp debugging in favour of general lsp documentation --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 29c791a commit 02c3b99

File tree

3 files changed

+77
-27
lines changed

3 files changed

+77
-27
lines changed

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-debugging.md

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

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)