Skip to content

refactor(amazonq): remove amazonqLSP and amazonqChatLsp experiments #7220

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions docs/lsp.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ sequenceDiagram

## Language Server Debugging

1. Clone https://github.com/aws/language-servers.git and set it up in the same workspace as this project by cmd+shift+p and "add folder to workspace" and selecting the language-servers folder that you just cloned. Your VS code folder structure should look like below.


1. Clone https://github.com/aws/language-servers.git and set it up in the same workspace as this project by cmd+shift+p and "add folder to workspace" and selecting the language-servers folder that you just cloned. Your VS code folder structure should look like below.

```
/aws-toolkit-vscode
Expand All @@ -45,17 +43,9 @@ sequenceDiagram
npm run package
```
to get the project setup
3. Enable the lsp experiment:
```
"aws.experiments": {
"amazonqLSP": true,
"amazonqLSPInline": true, // optional: enables inline completion from flare
"amazonqLSPChat": true // optional: enables chat from flare
}
```
4. Uncomment the `__AMAZONQLSP_PATH` and `__AMAZONQLSP_UI` variables in the `amazonq/.vscode/launch.json` extension configuration
5. Use the `Launch LSP with Debugging` configuration and set breakpoints in VSCode or the language server
6. (Optional): Enable `"amazonq.trace.server": "on"` or `"amazonq.trace.server": "verbose"` in your VSCode settings to view detailed log messages sent to/from the language server. These log messages will show up in the "Amazon Q Language Server" output channel
3. Uncomment the `__AMAZONQLSP_PATH` and `__AMAZONQLSP_UI` variables in the `amazonq/.vscode/launch.json` extension configuration
4. Use the `Launch LSP with Debugging` configuration and set breakpoints in VSCode or the language server
5. (Optional): Enable `"amazonq.trace.server": "on"` or `"amazonq.trace.server": "verbose"` in your VSCode settings to view detailed log messages sent to/from the language server. These log messages will show up in the "Amazon Q Language Server" output channel

## Amazon Q Inline Activation

Expand Down
7 changes: 2 additions & 5 deletions packages/amazonq/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,7 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
}
// This contains every lsp agnostic things (auth, security scan, code scan)
await activateCodeWhisperer(extContext as ExtContext)
if (
(Experiments.instance.get('amazonqLSP', true) || Auth.instance.isInternalAmazonUser()) &&
(!isAmazonInternalOs() || (await hasGlibcPatch()))
) {
if (!isAmazonInternalOs() || (await hasGlibcPatch())) {
// start the Amazon Q LSP for internal users first
// for AL2, start LSP if glibc patch is found
await activateAmazonqLsp(context)
Expand Down Expand Up @@ -172,7 +169,7 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is

context.subscriptions.push(
Experiments.instance.onDidChange(async (event) => {
if (event.key === 'amazonqLSP' || event.key === 'amazonqChatLSP' || event.key === 'amazonqLSPInline') {
if (event.key === 'amazonqLSPInline') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's blocking lspinline from being enabled by default?

await vscode.window
.showInformationMessage(
'Amazon Q LSP setting has changed. Reload VS Code for the changes to take effect.',
Expand Down
4 changes: 1 addition & 3 deletions packages/core/src/shared/settings-toolkit.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ export const toolkitSettings = {
},
"aws.experiments": {
"jsonResourceModification": {},
"amazonqLSP": {},
"amazonqLSPInline": {},
"amazonqChatLSP": {}
"amazonqLSPInline": {}
},
"aws.resources.enabledResources": {},
"aws.lambda.recentlyUploaded": {},
Expand Down
8 changes: 0 additions & 8 deletions packages/toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,17 +247,9 @@
"type": "boolean",
"default": false
},
"amazonqLSP": {
"type": "boolean",
"default": true
},
"amazonqLSPInline": {
"type": "boolean",
"default": false
},
"amazonqChatLSP": {
"type": "boolean",
"default": true
}
},
"additionalProperties": false
Expand Down
Loading