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

command aws.codeWhisperer.rejectCodeSuggestion not found #4409

Closed
dgokcin opened this issue Feb 8, 2024 · 6 comments
Closed

command aws.codeWhisperer.rejectCodeSuggestion not found #4409

dgokcin opened this issue Feb 8, 2024 · 6 comments
Labels
bug We can reproduce the issue and confirmed it is a bug. codewhisperer

Comments

@dgokcin
Copy link

dgokcin commented Feb 8, 2024

Problem

When using the GitHub Copilot extension, the default keymap for rejecting code suggestions triggers an annoying pop-up suggesting "command aws.codeWhisperer.rejectCodeSuggestion not found." Even though Code Whisperer suggestions are paused, pressing "esc" still results in this popup.

Steps to reproduce the issue

  1. Enable GitHub Copilot extension.

  2. Pause Code Whisperer suggestions.

  3. Attempt to reject a code suggestion using the default keymap.

  4. Observe the appearance of the pop-up message.

2024-02-08 12 49 19

Expected behavior

Rejecting code suggestions should not trigger any pop-up messages when Code Whisperer suggestions are paused.

Additional Information

This issue is disruptive to workflow and interrupts coding sessions. I am creating this new issue because of the related issues marked as closed.

System details (run the AWS: About Toolkit command)

  • OS: Darwin arm64 23.2.0
  • Visual Studio Code extension host: 1.87.0-insider
  • AWS Toolkit: 2.8.0
  • node: 18.17.1
  • electron: 27.2.3
@dgokcin dgokcin added the bug We can reproduce the issue and confirmed it is a bug. label Feb 8, 2024
@Will-ShaoHua
Copy link
Contributor

hey @dgokcin thanks for reporting to us.
Yes I think you can just sign out from CW and you should be still good to use AWS Toolkit.
Screenshot 2024-02-08 at 2 11 59 PM

I think the issue results from different inline completion extension interference (Copilot and CodeWhisperer), could you help me verify this aspect by disable Copilot and see if the issue persists? Thanks!

@dgokcin
Copy link
Author

dgokcin commented Feb 9, 2024

@Will-ShaoHua hello and thanks for the quick reply.

I can confirm that this issue persists only when two inline completion extensions are enabled at the same time. Disabling Copilot made the popup disappear. Ideally, when auto suggestions are paused, I expect the ignoring code suggestions keymap to be disabled as well.

The sign-out approach is not going to work for me because signing out from CW causes a sign-out from Amazon Q as well, and I often toggle between Copilot Chat and Amazon Q during my daily workflow. As a workaround, I found that disabling the keybinding works better for me by adding the following override to my keybindings.json:

  {
    "key": "escape",
    "command": "-aws.codeWhisperer.rejectCodeSuggestion",
    "when": "aws.codewhisperer.connected && inlineSuggestionVisible && !editorReadonly || isCloud9 && suggestWidgetVisible && !editorReadonly"
  }

@Will-ShaoHua
Copy link
Contributor

Ideally, when auto suggestions are paused, I expect the ignoring code suggestions keymap to be disabled as well.

Understood, we keep the keep binding because users can still trigger CW manually with [option] + [c]. But yes, we will figure out a way to mitigate this issue, after all not all users are aware of having multi inline completion providers is the root cause.

As a workaround, I found that disabling the keybinding works better for me by adding the following override to my keybindings.json

yea that works too!

@dgokcin
Copy link
Author

dgokcin commented Feb 9, 2024

Ideally, when auto suggestions are paused, I expect the ignoring code suggestions keymap to be disabled as well.

Understood, we keep the keep binding because users can still trigger CW manually with [option] + [c]. But yes, we will figure out a way to mitigate this issue, after all not all users are aware of having multi inline completion providers is the root cause.

As a workaround, I found that disabling the keybinding works better for me by adding the following override to my keybindings.json

yea that works too!

Fair enough. Thanks for looking into this.

@terris-peer
Copy link

This is particularly annoying when using Vim since it breaks the Escape key which is interpreted by VSCode as rejecting code suggestions.

@zixlin7
Copy link
Contributor

zixlin7 commented Jun 5, 2024

closing as duplicate of #3509

@zixlin7 zixlin7 closed this as completed Jun 5, 2024
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

No branches or pull requests

5 participants