Skip to content

Merge master into feature/agentic-chat-MCP #7080

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 211 commits into
base: feature/agentic-chat-MCP
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/agentic-chat-MCP
git merge origin/master
git commit
git push origin HEAD:refs/heads/autoMerge/feature/agentic-chat-MCP

jpinkney-aws and others added 25 commits April 14, 2025 11:20
## Problem
- main.ts is hard to parse and there's circular dependency between
everything

## Solution
- refactor it so that all circular references can be resolved by calling
a property on the WebviewUIHandler class

## Notes
- the code is the **exact same** other then I reference properties on
the WebviewUIHandler class directly, instead of calling the top level
variables
- this makes [hybrid
chat](#7032) a lot easier,
since it's directly calling the WebviewUIHandler
- these changes were done ontop of
b127c92,
so the latest main.ts changes are already refactored as well

---

- 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
Need model API update for next edit prediction

## Solution
Update API model according to:
https://code.amazon.com/reviews/CR-188571226/revisions/2#/details

Steps followed is the same as
#6849, copying
aws-sdk-external-2022-11-11/c2j/codewhispererruntime-2022-11-11.normal.json
and then format it using prettier plugin in VS Code. By doing so, the
format of the JSON matches the one in the repo.
## Problem
- Flare's hybrid chat injects MynahUI reference after chat connector
creation

## Solution
- Implement delayed resolution so that onces MynahUI is injected
everything dynamically resolves

---

- 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
- Before region expansion:
  customization is bound to a specific idc instance
- After region expansion:
  customization is bound to a specific Q profile and an idc instance can
  have multi profiles
  - therefore each Q profile will have access to different sets of
    customization

## Solution
We need to validate if the selected customization is accessible from the
user's selected profile, otherwise will get
```
*An error occurred while processing your request.*
This error is reported to the team automatically. We will attempt to fix it as soon as possible.
Details: The provided profile ARN and customization ARN is mismatched. (Service: CodeWhispererRuntime, Status Code: 403, 
```
## Problem
- In order to enable chat history in Flare the:
listConversationsRequestType, conversationClickRequestType,
tabBarActionRequestType events need to be implemented

## Solution
- Handle listConversationsRequestType, conversationClickRequestType,
tabBarActionRequestType 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.
## Problem
- we want a chat mode where agents are served by the local extension
while the regular "Chat" is served by flare

## Solution
- register mynah ui webview providers depending on lsp/normal
implementation
- temporarily disable the lsp (explain, fix, etc) commands, since they
are also registered in the normal "agent" flow
- redirect agent messages to the correct chat handler on the UI side
- redirect UI messages meant for agents to the extension side
- refactor main.ts so that it can be used by both the regular
implementation and the lsp one ~(I'll open a seperate PR to merge this
into master, since it's going to be a pain to maintain)~
    - #7033
- pass in references to mynah handlers so that mynah ref injection can
happen after in flare
    - #7046


Depends on ~#7033,
#7046

Related to aws/language-servers#962

---

- 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
When lsp fetch/install/start fails it does not mention the download
path, which could help with troubleshooting. #6972

    [info] using amazonqWorkspaceLsp service configuration: default
[info] lsp: Failed to download latest "AmazonQ-Workspace" manifest.
Falling back to local manifest.
    [info] lsp: Finished setting up LSP server
    [info] [Error] Starting client failed
    [info] Error: write EPIPE

## Solution
- Validate that `node` can actually run, before passing it to
`LspClient`.
- Add more logging.

Also captured by telemetry:

```
2025-04-16 08:24:51.738 [debug] telemetry: languageServer_setup {
  Metadata: {
    missingFields: 'id',
    metricId: '8da91a4b-ee00-4115-9b9e-796b5357402c',
    traceId: '8569c16e-d319-486e-a6f3-d4ee91698468',
    languageServerSetupStage: 'all',
    duration: '1417',
    result: 'Failed',
    reason: 'Error',
    reasonDesc: 'amazonqLsp: failed to run basic "node -e" test (exitcode=-2): [/Users/x/x/x/aws/x/x/x/x/x -e console.log("ok " + process.version)]',
    awsAccount: 'not-set',
    awsRegion: 'us-east-1'
  },
  Value: 1,
  Unit: 'Milliseconds',
  Passive: true
}
```
## Problem
currently tabs get added to the tabs storage when the onTabAdd handler
gets called.

In hybrid chat, the onTabAdd handler will never get called, because it
first needs to be in the tabsStorage, which doesn't happen because the
onTabAdd handler hasn't been called

## Solution
in hybrid chat mode just add new tabs directly to the tabs storage


---

- 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:
Ambiguous or misleading log messages.

Solution:
Refine the logging logic.
Problem:
Manifest resolver always reports:

    Failed to download latest "…" manifest. Falling back to local manifest.

Solution:
In `fetchRemoteManifest()`, if the ETag indicates no new manifest is
needed, return the local manifest instead of throwing an error
Problem:
The logic added in a264377 wasn't added in the other "lsp startup"
module.

Solution:
Add it to the new module also.
## Problem
When switching between different manifests, a newly downloaded version
might chronologically be older than all previously downloaded versions,
even though it's marked as the latest version in its own manifest. This
is why we are getting the EPIPE error when trying out the alpha
manifest. The cleanup deletes the language server right after it was
downloaded

## Solution
In such cases, we skip the cleanup process to preserve this version.
Otherwise we will get an EPIPE error. At this point the version that was
downloaded shouldn't be delisted, so we don't want to make sure its not
removed

---

- 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.
@aws-toolkit-automation aws-toolkit-automation requested review from a team as code owners April 17, 2025 15:56
yueny2020 and others added 30 commits May 9, 2025 18:15
## 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 <[email protected]>
## 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 <[email protected]>
## 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 <[email protected]>
#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.
## Problem

We need a way to clear `globalState` since it looks like some users are
getting in to a bad corrputed state where things stop working.

Uninstalling the extension does not clear state, it is intentionally
designed that way by vscode, as we don't want to wipe states on
extension updates.

## Solution:

This creates a new command "Amazon Q: Clear extension cache" which
clears the cache and reloads the window.

There is safety modal which pops up right before clearing after the
command is selected.

---

- 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 <[email protected]>
## Problem

/transform was unnecessarily prompting users for their target JDK paths
in some cases.

## Solution

Remove the prompt.

---

- 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 <[email protected]>
## Problem

In order to coordinate the new
aws/language-servers#1348 change,
GenerateCompletions requests would start expecting the `fileUri` field
to be set.

## Solution

Add `fileUri` to FileContext

---

- 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: Jiatong Li <[email protected]>
## Problem
- AgenticChat will add a grepSearch tool which depends on ripgrep binary

## Solution
- Add ripgrep path and make it executable

---

- 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

Our transformation now looks different, so we want the IDE to be able to
handle the new plan response.


## Solution

Implement parsing logic.

---

- 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 <[email protected]>
## Problem

Prompting users to select one or multiple diffs is a very infrequently
used feature.


## Solution

Remove it.

---

- 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 <[email protected]>
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.