-
Notifications
You must be signed in to change notification settings - Fork 608
feat(amazonq): Add language server support for codewhisperer #6462
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…6142) ## Problem We want to experiment with the amazon q language server ## Solution Set up the structure for the eventual amazon q language srever
## Problem - we need a way to download the manifest and install the correct mynah ui/language server code ## Solution - create a common lsp downloader that flare/workspace lsps can use
## Problem - vscode doesn't have the codewhisperer lsp for completion requests ## Solution - use the codewhisperer lsp when `"aws.experiments": { "amazonqLSP": true },` --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
…ing (#6775) ## Problem - missing diagrams for how the chat activation flow will work in flare - missing diagrams for how e2e test should work in flare ## Solution - add missing diagrams - remove lsp debugging in favour of general lsp documentation --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
## Problem - we have tests for the amazon q lsp installer but not the workspace context lsp installer ## Solution - add tests for the workspace context lsp installer - add a test for language server activation --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
…minutes (#6793) ## Problem - When the bearer token updates in the background we never re-notify the language server ## Solution - update it every 5 minutes as a hack to unblock the pentest --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
tomcat323
approved these changes
Mar 17, 2025
hayemaxi
approved these changes
Mar 17, 2025
justinmk3
reviewed
Mar 17, 2025
justinmk3
reviewed
Mar 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything in lsp/utils/ could be moved up into lsp/. Is the nesting communicating a meaningful grouping?
justinmk3
reviewed
Mar 18, 2025
@@ -267,6 +273,17 @@ export async function waitUntil<T>(fn: () => Promise<T>, options: WaitUntilOptio | |||
let elapsed: number = 0 | |||
let remaining = opt.timeout | |||
|
|||
// Internal helper to determine if we should retry | |||
function shouldRetry(error: Error | undefined): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, #6762 wasn't merged yet...
justinmk3
approved these changes
Mar 18, 2025
…s via Amazon Q Language Server (#6800) ## Problem - Missing changelog ## Solution - Add it before releasing --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
…6808) ## Problem If you have a `.DS_STORE` file in the same directory of the language server cache versions your language server will crash ## Solution Only look for valid semver versions when cleaning up your cache --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
…e Server (#6811) ## Problem When running multiple VSCode windows on mac arm64, Amazon Q's language server works correctly in the first window but crashes in additional windows with the error: `EXC_CRASH (SIGKILL (Code Signature Invalid))` ## Root Cause The crash occurs because: - The first VSCode window starts the language server and extracts everything (including the node binary from flare) - When additional VSCode windows are opened, they attempt to re-extract the zip from flare, overriding the current contents - On mac arm64, overwriting the node binary while it's in use by the first VSCode window can apparently cause code signing validation to fail for the next callers of it - This didn't effect windows when I was playing around with it yesterday - Weirdly enough, if you start the language server outside of VSCode, unzip servers.zip again, and then spawn a new language server it doesn't seem to have an issue. My guess is there's some weird interplay with electron owning the spawning of the processes ## Solution Instead of forcefully overriding contents in flare, only copy over the file if its necessary --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
## Problem - We removed chat a while ago from the `feature/amazonqLSP` branch because we were just starting with inline suggestions ## Solution - Now that we're moving to use chat we can re-add it - Implement explain, refactor, fix, optimize, sendToPrompt, openTab - Add a feature flag for enabling/disabling chat - **note**: amazonqLSP and amazonqChatLSP must be enabled in order for chat support to work - extended the baseinstaller so that individual lsps installers can provider their own resource paths ## Notes - this is the equivalent of https://github.com/aws/language-servers/blob/55253ea258b2d34bcc47b93e9998b1e9898e8f2a/client/vscode/src/chatActivation.ts but integrated with our codebase - since commands require the webview we pass in the view provider to all commands so we can lazy evaluate the webview when required - certain message listeners are only registered _after_ the UI is resolved --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
## Problem The inline completion document selectors between vscode's currently implementation and the new implementation aren't aligned ## Solution Rather than providing our own implementation that was originally stolen from [here](https://github.com/aws/language-servers/blob/main/client/vscode/src/inlineCompletionActivation.ts#L22) and expanding it, we should just use the exact document selectors that vscode already uses from [here](https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/codewhisperer/models/constants.ts#L104) --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
Merge master into feature/amazonqLSP
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Solution
TODOs before this is merged
feat(amazonq): Add lsp downloading support for windows/linuxtelemetry(lsp): Integrate language server/manifest resolver telemetryAdd a test for workspace context server downloadingMerging amazon q documents language server output channel with amazon q logsUpdating the initialization options nameTested on WindowsRisks
feature/x
branches will not be squash-merged at release time.