Skip to content
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

CodeWhisperer errors when Not Enabled #3490

Closed
mousedownmike opened this issue May 22, 2023 · 17 comments · Fixed by #3518
Closed

CodeWhisperer errors when Not Enabled #3490

mousedownmike opened this issue May 22, 2023 · 17 comments · Fixed by #3518
Labels
bug We can reproduce the issue and confirmed it is a bug. codewhisperer

Comments

@mousedownmike
Copy link

Problem

Steps to reproduce the issue

  1. Install AWS Toolkit alongside GitHub Copilot
  2. Leave Code Whisperer disabled (Should show "Start" button in the extension configuration).
  3. Write some code and observe suggestions appear (assumed to be from CoPilot)
  4. Hit Tab to accept the suggestions.
  5. Observe:
  • Suggested code is not inserted.
  • Code Whisperer error message appears: command 'aws.codeWhisperer.rejectCodeSuggestion' not found

Expected behavior

Code Whisperer should NOT be running.
CoPilot suggestion should be inserted.

System details (run the AWS: About Toolkit command)

OS: Linux x64 5.19.0-41-generic
Visual Studio Code extension host: 1.78.2
AWS Toolkit: 1.74.0
node: 16.17.1
electron: 22.5.2

@mousedownmike mousedownmike added the bug We can reproduce the issue and confirmed it is a bug. label May 22, 2023
@peterabbott
Copy link

+1 seeing this too, had to disable the entire plugin. Was getting in the way.

@justinmk3 justinmk3 changed the title Code Whisperer errors when Not Enabled CodeWhisperer errors when Not Enabled May 22, 2023
@bombillazo
Copy link

bombillazo commented May 23, 2023

Please fix this! This is tampering with our productivity as the cursor gets stuck in place whenever this error prompts up! We use the AWS toolkit to connect to our cloud account. We don't have anything regarding Code Whisperer set up. 😫

I tried disabling anything related to CW in the settings to no avail:

image

@laygir
Copy link

laygir commented May 23, 2023

This is very annoying, keeps breaking my productivity for the whole last week. Suddenly getting stuck in hitting esc key and unable to escape from this error 🤯

@rosmcmahon
Copy link

yes, very annoying, disabling the entire plugin seems to be the only course of action.

@hauboldj
Copy link

I was able to fix this by removing the keybinding for aws.codeWhisperer.rejectCodeSuggestion command. I don't have a screenshot unfortunately. After removing this keybinding I don't see the command anymore. I guess that the AWS Toolkit has removed this command, but didn't remove the keybinding and VS Code evaluates if the command exists before evaluating the When clause for keybinding.

@bombillazo
Copy link

@hauboldj thanks! Here are all the bindings, I guess Ill be removing them all:
image

@samuelbutler
Copy link

I was able to just remove the aws.codeWhisperer.rejectCodeSuggestion keybinding, and after doing that the escape key works properly and actually rejects the code suggestion.

In the command palette (ctrl-shift-p), the settings in the screenshot above can be found in

Preferences: Open Keyboard Shortcuts.

Then just search for the keybinding by name and right click on it to select remove keybinding.

@jtele2
Copy link

jtele2 commented May 26, 2023

I get this error with CodeWhisperer and GitHub CoPilot enabled. I had to disable GitHub CoPilot to make the error go away (if I want to keep using CodeWhisperer). I know it is not 100% the purpose of this Issue, but the fix should also address the issue of:
CodeWhisperer: On
GitHub CoPilot: On

@Will-ShaoHua
Copy link
Contributor

Will-ShaoHua commented Jun 2, 2023

Hi folks, the fix will be in the next release (1.76), sorry for the inconvenience, thanks!

@Will-ShaoHua
Copy link
Contributor

Will-ShaoHua commented Jun 2, 2023

Hi folks, have to explicitly call out here, the fix will cover scenario where CodeWhisperer is disabled and still see the command not found error, however it will NOT fix when both CodeWhipserer is enabled and Copilot is enabled (or any other inline suggestion provider), we are actively working on the fix for such failure mode. Sorry for the inconvenience and again thanks for all your patience!

@mousedownmike
Copy link
Author

@Will-ShaoHua, having more than one inline suggestion provider enabled at a time seems like an edge/error condition that can probably be worked around with documentation. Thanks for getting this immediate issue fixed so promptly, it is appreciated.

@Will-ShaoHua
Copy link
Contributor

Hi team, I want to follow with you if the issue here is gone after updating to 1.76 version of Aws Toolkit? Thanks!

@mousedownmike
Copy link
Author

@Will-ShaoHua, I've been using the new extension on Linux today with no problems. I can't remember if the problem happened on Mac as well, but I was using the updated extension all weekend on Mac with Copilot and everything was running smoothly.

Thanks!
⭐ ⭐ ⭐ ⭐ ⭐

@Will-ShaoHua
Copy link
Contributor

understood, thanks for the reply @mousedownmike!
Glad to hear everything is working fine :) Please let us know if anything thing weird happen, would appreciate all the feedbacks!

Thanks!

@terrisgit
Copy link

terrisgit commented Jan 8, 2024

I am getting this error with aws toolkit extension version 2.4.0 on macos. VSCode version 1.85.1

@justinmk3
Copy link
Contributor

@terrisgit can you open a new issue, including the Toolkit logs (remove any private info)?

  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.
  4. Remove any private info from the logs.

@terris-peer
Copy link

terris-peer commented Feb 24, 2024

justinmk3 The issue and workaround are at #4409 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug. codewhisperer
Projects
None yet
Development

Successfully merging a pull request may close this issue.