Commit aeca817
authored
refactor(amazonq): pull out all decryption logic to one place (#7248)
## Problem
Follow up to
#7235 (comment).
## Solution
- extract all decrypting and encrypting logic to a single location.
- add a simple test for this logic (encrypt and decrypt are inverses).
- refactor existing implementations.
## Verification
Used agentic chat with some tools, as well as inline chat and didn't
notice a difference. If encryption were broken, I would expect this to
fail immediately.
---
- 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 0b751ac commit aeca817
File tree
4 files changed
+51
-32
lines changed- packages/amazonq
- src
- inlineChat/provider
- lsp
- chat
- test/unit/amazonq/lsp
4 files changed
+51
-32
lines changedLines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
85 | 82 | | |
86 | 83 | | |
87 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
219 | 212 | | |
220 | | - | |
221 | | - | |
222 | | - | |
| 213 | + | |
223 | 214 | | |
224 | 215 | | |
225 | 216 | | |
| |||
482 | 473 | | |
483 | 474 | | |
484 | 475 | | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
| 476 | + | |
489 | 477 | | |
490 | 478 | | |
491 | 479 | | |
| |||
495 | 483 | | |
496 | 484 | | |
497 | 485 | | |
| 486 | + | |
498 | 487 | | |
499 | 488 | | |
500 | 489 | | |
| |||
508 | 497 | | |
509 | 498 | | |
510 | 499 | | |
511 | | - | |
512 | | - | |
| 500 | + | |
| 501 | + | |
513 | 502 | | |
514 | 503 | | |
515 | 504 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments