aws-toolkit-vscode: "command aws.codeWhisperer.rejectCodeSuggestion not found" if connection expired

Problem

command 'aws.codeWhisperer.rejectCodeSuggestion' not found keeps popping up when I press escape when a suggestion is made and I want to dismiss it.

Note: I’m using Copilot and Code Whisperer at the same time.

Steps to reproduce the issue

Expected behavior

System details (run the AWS: About Toolkit command)

I’m using copilot and aws code whisperer at the same time.

  • OS: mac
  • Visual Studio Code version: 1.78.2
  • AWS Toolkit version: 1.74.0

About this issue

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

Most upvoted comments

This happens for me even when I’ve explicitly disabled code whisperer in the AWS extension config

Hey @Will-ShaoHua, in my case the connection expired and I didn’t log in again.

While it’s true that I didn’t actually remove the connection, I’m also not connected so I would expect CodeWhisperer to be disabled & not setting any event listener:

Screenshot 2023-06-11 at 11 59 30

If I remove the connection using the button you highlighted above the warning disappears.

I still think that there should be no warning unless CodeWhisperer is enabled (i.e. auto suggestions are on), connected, and with active credentials.

Hi @disbelief, gotcha, yea I think we might need to make our UI more intuitive so that ppl won’t be confused when they plan to disable it 😃 . So “disable” codewhisperer in the current product spec, we will be referring to “disconnect” from codewhisperer. Thus we should click on the smal unplugl icon next to the connection shown.

Screenshot 2023-06-11 at 2 29 10 AM

However this issue will still happen if there are multiple inline suggestion providers, thus if you enable both CodeWhisperer and Copilot at the same time, you will still see this error, which we are actively tracking. But you shouldn’t see this error pop out when you are disconnected from codewhisperer. If that’s happening then we have a bug lol