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.46k stars 407 forks source link

Hover getting disabled automatically by AWS Tookit #3014

Closed aproli90 closed 1 year ago

aproli90 commented 1 year ago

Problem

Since few days, the hover popup in my VSCode gets disabled automatically for the current user. Basically, the property @id:editor.hover.enabled is unset for User, but remains checked for Workspace

Steps to reproduce the issue

I have not been able to pinpoint what triggers this issue, but know the code that's causing it.

Refer this VSCode github issue to understand the exact issue: https://github.com/microsoft/vscode/issues/165988

The root cause was identified by one of their Principal Software Engineering Managers (Alexandru Dima): https://github.com/aws/aws-toolkit-vscode/blob/6b8d0d63b9481e4a61708e47df2dd44d89e268ee/src/codewhisperer/util/hoverConfigUtil.ts#L9-L37

As per the code, you guys seem to be doing a workaround for inline completions, which is having a bug.

Expected behavior

The hover functionality should not get auto-disabled

System details (run the AWS: About Toolkit command)

OS: Windows_NT x64 10.0.22621 Visual Studio Code extension host: 1.70.0 AWS Toolkit: 1.53.0 node: 16.13.2 electron: 18.3.5

justinmk3 commented 1 year ago

Thanks for reporting this! Could be related to https://github.com/aws/aws-toolkit-vscode/commit/a535688f6a472695b7778c6b2cf535899b78e316 , however that change was included as far back as AWS Toolkit 1.51. If the issue only started a few days ago, it will help to narrow down the version where it was introduced.

You mentioned that you are using AWS Toolkit 1.53.0. The latest version is 1.56, which includes many CodeWhisperer improvements. Can you try 1.56? If the issue still persists there, in vscode you can Install Another Version of AWS Toolkit as shown below. Does the issue happen in 1.52 / 1.51 / 1.50?

image
aproli90 commented 1 year ago

I have been observing this issue for at least 1.5 months now. Also, the suspected file doesn't have any commit after Sept 22 (file history). So, I doubt the latest version has this fixed. But I still upgraded to 1.56. Will let you know if it's still persistent.

If it does, will try your suggestion of downgrading too. It might be a very slow process to debug though since I don't know what exactly triggers this issue

justinmk3 commented 1 year ago

@aproli90 we have confirmed this issue and we are working on a fix.

hediet commented 1 year ago

workaround for inline completions, which is having a bug.

If there is a bug indeed, we would appreciate if you could file an issue in the VS Code repo!

aproli90 commented 1 year ago

workaround for inline completions, which is having a bug.

If there is a bug indeed, we would appreciate if you could file an issue in the VS Code repo!

I don't have details on why it's a workaround for a bug. I just suspect it. All I see if hover being disabled forcefully in toolkit extension at the given line number. Would be great if one of the engineers from your team who have the context file the issue

justinmk3 commented 1 year ago

AWS Toolkit provides suggestions from CodeWhisperer. To do so, we implement vscode.InlineCompletionItemProvider. We also override "editor.action.inlinesuggest.shownext" and related commands when CodeWhisperer is providing suggestions so that the inline suggestion popup Next and Previous buttons provide CodeWhisperer suggestions.

As a short-term solution, we've removed the workaround in AWS Toolkit v1.59 (not released yet) that temporarily disabled the hover popup. But now on mouse-hover, users that have installed GitHub Copilot will see a popup with a Open GitHub Copilot button (while CodeWhisperer is providing suggestions), which is very confusing.

image

justinmk3 commented 1 year ago

This should be fixed with AWS Toolkit 1.60. Sorry for the trouble!