Skip to content

Merge master into feature/amazonqLSP-auth #7322

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

Open
wants to merge 163 commits into
base: feature/amazonqLSP-auth
Choose a base branch
from

Conversation

aws-toolkit-automation
Copy link
Collaborator

Automatic merge failed

  • Resolve conflicts and push to this PR branch.
  • Do not squash-merge this PR. Use the "Create a merge commit" option to do a regular merge.

Command line hint

To perform the merge from the command line, you could do something like the following (where "origin" is the name of the remote in your local git repo):

git stash
git fetch --all
git checkout origin/feature/amazonqLSP-auth
git merge origin/master
git commit
git push origin HEAD:refs/heads/autoMerge/feature/amazonqLSP-auth

aws-toolkit-automation and others added 30 commits May 6, 2025 18:40
## Problem

Inconsistent behavior when opening agent tabs (/review, /doc, etc). When
the tab is reused it keeps the prompt input options visible, but when a
new tab is created it doesn't.



https://github.com/user-attachments/assets/2ff7264f-f7a3-46f6-9a34-e29835768833




## Solution

Set `promptInputOptions` to empty when an existing tab is reused.


---

- 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
clientId from
`clientParams.initializationOptions?.aws?.clientInfo?.clientId` is
random on every restart

## Solution
use the client id from telemetry utils


---

- 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.
When the server crashes and then restarts again, we will emit a metric
to indicate it crashed.

When querying look for: `metadata.metricName: languageServer_crash` &
`metadata.id: AmazonQ`

---

- 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.

Signed-off-by: nkomonen-amazon <nkomonen@amazon.com>
## Problem
FileCreationFailed exceptions are displayed as UnknownException in
telemetry. This exception is new and we want to separate this out from
other unknown exceptions.

## Solution
Return API service error with `FileCreationFailedException`
## Problem
Extension version sent to Q LSP is hardcoded.

## Solution
Ssend the actual extension version

BEFORE:

    aws-sdk-nodejs/2.1692.0 darwin/v23.10.0 AWS-Language-Servers AWS-CodeWhisperer/0.1.0 AmazonQ-For-VSCode/0.0.1 Visual-Studio-Code---Insiders/1.100.0-insider ClientId/c342ab45-6aba-4118-b48c-44dcedb10a78 promise


AFTER

    aws-sdk-nodejs/2.1692.0 darwin/v23.10.0 AWS-Language-Servers AWS-CodeWhisperer/0.1.0 AmazonQ-For-VSCode/testPluginVersion Visual-Studio-Code---Insiders/1.100.0-insider ClientId/c342ab45-6aba-4118-b48c-44dcedb10a78 promise
## Problem
- No logs is being emitted for  telemetry events.

## Solution
- Adding logs if telemetry events are emitted.

---

- 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.
…7291

## Problem
`workspaceIdentifier` should be a string:
- aws/language-server-runtimes#497

## Solution
Pass `extensionContext.storageUri?.path`.
## Problem
New telemetry metrics were
[added](aws/aws-toolkit-common#1023) to
aws-toolkit-common

## Solution
Consume latest version of aws-toolkit-common package


## Problem
VS Code treats each cell in a notebook as a separate editor. As a
result, when building the left- and right-contexts for the completion
from the current editor, we were limited to just the current cell, which
might be very small and/or reference variables and functions defined in
other cells. That meant that completions never used the context of other
cells when making suggestions, and were often _very_ generic.
#7031

## Solution
The `extractContextForCodeWhisperer` function now checks if it is being
called in a cell in a Jupyter notebook. If so, it collects the
surrounding cells to use as context, respecting the maximum context
length. During this process, Markdown cells have each line prefixed with
a language-specific comment character.
…sp (#7281)

## Problem
Add importAdder and userWrittenCode configuration to inline with LSP

## Solution


---

- 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

At the startup of the extension, the customization that a user already
decided previously was not being pushed to flare.
The only time we would push the customization to flare was if the
customization was changed.

Otherwise everything else works as expected.


## Solution

On startup, push the customization to flare (if it already exists)

---

- 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.

Signed-off-by: nkomonen-amazon <nkomonen@amazon.com>
## Problem
- Added new metrics in aws-toolkit-common package:
aws/aws-toolkit-common#1024

## Solution
- Consume latest version of aws-toolkit-common package



---

- 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

LSP cannot start without GLIBC>=2.28 in AL2 aarch64 and CloudDevMachine

## Solution


---

- 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.
Add doc how to export logs


---

- 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.

Signed-off-by: nkomonen-amazon <nkomonen@amazon.com>
## Problem


## Solution


---

- 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.
See individual commits for isolated changes

## Problem

We were seeing the following errors from the Q Language Server on
startup:
- `Amazon Q Profile is not selected for IDC connection type`
- `Amazon Q service is not signed in`

## Solution

We needed to do 2 solutions, each is a separate commit (see their
message). There were also some minor refactors.

In short:
- The Auth bearer token MUST be sent to the Q LSP before Profile is
sent. We were not doing this and it was causing an error
- When sending the Auth to the Q LSP, the startUrl MUST be included in
the request or else it would fail. We thought we were sending it but
based on the logs prefixed with `UpdateBearerToken` it showed`sso` did
not contain the startUrl

---

- 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.

---------

Signed-off-by: nkomonen-amazon <nkomonen@amazon.com>
#7314)

## Problem
We need to catch MCP server menu events on VSCode.

## Solution
- Updated runtimes for new VSCode requests for mcp servers.
- Added switch cases for mcp events.

---

- 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.
laileni-aws and others added 30 commits June 19, 2025 12:03
## Problem
- Missing `chatOptions` like mcp icon, history icon, export icon in tab
bar and quickActions like `/clear` and `/help` in the input menu.

![image](https://github.com/user-attachments/assets/386fd680-991e-4f61-821c-276d5e66df2b)

#### Root Cause 1:
- The `CHAT_OPTIONS` command is sometimes not properly received by the
handleInboundMessage function in the chat client.
- The root issue was a race condition in the communication between the
VSCode extension and the webview component. When the
`onDidResolveWebview` event fired, the code was immediately trying to
send a message to the webview, but in some cases, the webview wasn't
fully ready to receive messages yet, causing the message to be lost.
#### Root Cause 2:
- If user opens a large repository(example:
[JetBrains](https://github.com/aws/aws-toolkit-jetbrains)) in any
IDE(VSC or JB or VS or Ecllipse), IDE takes some time to do indexing.
- This delay of indexing is stopping the webview to initialize and if
the webview is delayed, the `chatOptions` like quickActions(`/help` or
`/clear`) and tab bar icons are not sent because of webview delay.

## Ideal case:

- VSC Extension at `messages.ts`, `chatOptions` are sent to the [webview
using webview.postMessage() with the command
CHAT_OPTIONS](https://github.com/aws/language-servers/blob/0cac52c3d037da8fc4403f030738256b07195e76/client/vscode/src/chatActivation.ts#L340-L348)
and this is handled by the `handleInboundMessage` in `LS/chat.ts` file.

## Solution:

1. Listen to dedicated `aws/chat/ready` event, which ensures we only
send messages when the UI is fully initialized and ready to process
them.
2. The chat options are stored when initialized, and then sent when the
`aws/chat/ready` event is received from the UI.
3. Added explicit try/catch around the message sending process with
proper error logging.
4. Added clearer log messages to track the UI ready event and message
sending process, which will make debugging easier if issues arise in the
future.



---

- 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.
## Notes:
- Adding change log for #7520 

---

- 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.
…nch (#7531)

## Problem
- Right now, Q does not open the history tabs automatically after VSC
Reload or restart

## Solution
- This PR fixes the above issue

---

- 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.
fix(amazonq): allow node to inherit proxy settings from VSC
…

## Problem
- to reduce # of service calls within short time duration and result in
throttling error thrown
- 


## Solution


---

- 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.
…ble deployment from WFS (#7315)

## Problem

- Save telemetry was being recorded for all document saves in VS Code,
not just for the active workflow studio document.
- Save & Deploy functionality required closing Workflow Studio before
starting deployment


## Solution

- Add URI comparison check to ensure telemetry is only recorded when the
saved document matches the current workflow studio document.
- Refactored publishStateMachine.ts to accept an optional TextDocument
parameter and updated activation.ts to support new interface
- Removed closeCustomEditorMessageHandler call from
saveFileAndDeployMessageHandler


---

- 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.

---------

Co-authored-by: Diler Zaza <zazadile@amazon.com>
## Problem

Instead of running `mvn dependency:copy-dependencies` and `mvn clean
install`, we have a JAR that we can execute which will gather all of the
project dependencies as well as some important metadata stored in a
`compilations.json` file which our service will use to improve the
quality of transformations.


## Solution

Remove Maven shell commands; add custom JAR execution.


---

- 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.

---------

Co-authored-by: David Hasani <davhasan@amazon.com>
fix(amazonq): migrate process.env proxy setting handling to proxyUtil.ts
## Problem

Minor text update request.

## Solution

Update text.

---

- 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.

Co-authored-by: David Hasani <davhasan@amazon.com>
fix(amazonq): fix for amazon q app initialization failure on sagemaker
fix(amazonq): Re-enable experimental proxy support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.