-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(settings): minimize duplication across prompt settings. #6243
base: master
Are you sure you want to change the base?
Conversation
|
) { | ||
public isPromptEnabled(promptName: promptName) { | ||
try { | ||
return !this._getOrThrow(promptName, false as never) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Believe there is an issue with how I setup types since I need the cast here.
@@ -808,7 +808,7 @@ class DiskCacheErrorMessage { | |||
: ToolkitPromptSettings.instance | |||
|
|||
// We know 'ssoCacheError' is in all extension prompt settings | |||
if (await promptSettings.isPromptEnabled('ssoCacheError')) { | |||
if (promptSettings.isPromptEnabled('ssoCacheError')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a welcome change 👍
Not a strong reason for this function to be async
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isolated this change here: https://github.com/aws/aws-toolkit-vscode/pull/6255/files
Problem
ToolkitPromptSettings
andAmazonQPromptSettings
reimplement the same functions.Solution
TODO: figure out how to type the booleans to avoid casting
feature/x
branches will not be squash-merged at release time.License: I confirm that my contribution is made under the terms of the Apache 2.0 license.