aws-toolkit-vscode: CodeWhisperer errors when Not Enabled

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

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 16
  • Comments: 17 (5 by maintainers)

Most upvoted comments

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 🤯

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

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

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.

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.

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

@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! ⭐ ⭐ ⭐ ⭐ ⭐

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

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

@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.

@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.

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!