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.41k stars 346 forks source link

cleanup: moved a bunch of static text into types #5225

Closed 32teeth closed 1 week ago

32teeth commented 1 week ago

Problem

The current implementation contains hardcoded static text within the Messenger class, leading to repetitive and unmanageable code. This makes it difficult to maintain and update error messages and placeholders across the application.

Solution

Refactor the Messenger class to use enums for error messages and placeholders. This approach centralizes the management of static text, improving code maintainability and readability. The changes include:

[!TIP] As a follow up, it would be good to consolidate some of the repetitive nature of dispatcher stuff ex: sendAuthNeededExceptionMessage into a single utility class

License

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

jpinkney-aws commented 1 week ago

As a follow up, it would be good to consolidate some of the repetitive nature of dispatcher stuff ex: sendAuthNeededExceptionMessage into a single utility class

:+1: Theres a TON of duplication like this inside of q/featuredev/gumby/cwc that nobody has had time to revisit yet

32teeth commented 1 week ago

As a follow up, it would be good to consolidate some of the repetitive nature of dispatcher stuff ex: sendAuthNeededExceptionMessage into a single utility class

👍 Theres a TON of duplication like this inside of q/featuredev/gumby/cwc that nobody has had time to revisit yet

I will find time. Remove redundancies for efficiencies TY