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.48k stars 413 forks source link

How to Disable the 'Learn CodeWhisperer' Page from Appearing on VSCode Startup #3910

Closed LHR-lhr closed 10 months ago

LHR-lhr commented 11 months ago

System details (run the AWS: About Toolkit command)

Question

Every time I launch Visual Studio Code (VSCode), a 'Learn CodeWhisperer' page automatically pops up. I am looking for a solution to disable this page from appearing on startup.

Steps to Reproduce:

1、Launch Visual Studio Code. 2、Observe the automatic appearance of the 'Learn CodeWhisperer' page.

Expected Behavior:

I would like to find a way to prevent the 'Learn CodeWhisperer' page from appearing every time I start VSCode.

image

justinmk3 commented 11 months ago

This page should not show after the first start. That decision is remembered in vscode setting aws.suppressPrompts.

image
LHR-lhr commented 11 months ago

Thank you so much! This solved my issue!

I couldn't find the codeWhispererNewWelcomeMessage setting when I searched for aws.suppressPrompts in VSCode settings. image

So, I added the following to my settings.json:

"aws.suppressPrompts": {
     "codeWhispererNewWelcomeMessage": true,
 }
justinmk3 commented 11 months ago

That suggests something is going wrong with the vscode settings system.

Can you share your logs for Extension Host: image

and also the AWS Toolkit logs (check that private info is removed)?

  1. In VSCode settings, ensure that "aws log level" is "debug".
  2. Perform the steps to reproduce the issue.
  3. Use the AWS: View Toolkit Logs command to get the logs.
LHR-lhr commented 11 months ago

Oh! I've realized that I made a somewhat foolish mistake. When I tried to reproduce the issue, I found a syntax error in the last line of my settings.json file! After fixing this error, I couldn't reproduce the issue anymore. Upon reviewing the settings.json file, the configuration

"aws.suppressPrompts": {
     "codeWhispererNewWelcomeMessage": true,
 }

was successfully written. Therefore, I suspect that the previous issue was likely due to the syntax error in the last line of settings.json, which was causing the extension's settings not to be written correctly. Nevertheless, I want to express my gratitude for taking the time to answer my question.

justinmk3 commented 11 months ago

I found a syntax error in the last line of my settings.json

That's helpful, thanks for sharing that! We should probably check for this and show a useful message instead of silently failing: https://github.com/aws/aws-toolkit-vscode/pull/3924

vscode itself detects some cases but not all.

image
LHR-lhr commented 11 months ago

My setting.json file error is like this: "aws.lambda.recentlyUploaded": [ ] "editor.linkedEditing": true

but vscode does not notify the settings.json error

justinmk3 commented 10 months ago

Thanks! If you can try the prerelease from https://github.com/aws/aws-toolkit-vscode/releases/tag/prerelease , AWS Toolkit should detect this and warn about it.

justinmk3 commented 10 months ago

Implemented in AWS Toolkit 1.96