aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.47k stars 408 forks source link

refactor: use globalState abstraction in AmazonQ/CodeWhisperer modules #5309

Closed justinmk3 closed 2 months ago

justinmk3 commented 2 months ago

Problem

Use of vscode's globalState interface allows bugs such as https://github.com/aws/aws-toolkit-vscode/pull/3060#discussion_r1050240283 .

See https://github.com/aws/aws-toolkit-vscode/pull/5293 for details.

Solution

Update codewhisperer code to use globals.globalState , which allows type-checking, error handling, and centralization of related logic.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

justinmk3 commented 2 months ago

/runintegrationtests