Skip to content

Merge master into feature/agentic-chat #7035

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

## 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.
@aws-toolkit-automation aws-toolkit-automation requested a review from a team as a code owner April 14, 2025 15:23
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.

## 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.
@aws-toolkit-automation aws-toolkit-automation requested a review from a team as a code owner April 15, 2025 15:08
jpinkney-aws and others added 2 commits April 15, 2025 16:38
## 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, 
```
@aws-toolkit-automation aws-toolkit-automation requested a review from a team as a code owner April 15, 2025 23:45
jpinkney-aws and others added 22 commits April 16, 2025 08:53
## 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
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:
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.
…#6999)

## Problem
for agentic chat with language server, we need client to handle open
files and update context command

## 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
We did not utilize server side compute to help improve the quality of
inline completion, chat, etc.

## Solution
1. Add server side project context support.

---

- 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 run in AL2 due to glibc compatibility.

## Solution

Do not start LSP in AL2. 


---

- 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 heard from users that auto scans are sometimes causing highlight
linting issues where entire IDE is now yellow-underlined with warnings
that may sometimes be irrelevant

## Solution

We will disable auto scans by default, and user can re-enable in the
menu.

---

- 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
catch error for show document it should not crash the server

## 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.
We introduced a new auth state `pendingProfileSelection`, however the
current code path will determine the connectivity to be `disconnected`
and thus we observe a drastic drop of `connected` users and increase of
`disconnected`.

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

followup of #7049 

as mentioned in #7049
```
Before we introduced QProfile
    customization is bound to a specific idc instance

After
    customization is bound to a specific Q profile and an idc instance can have multi profiles

in other words, each Q profile will have access to different sets of customization
```



## Solution

Product team wants us to show all customizations across profiles instead
of the connected one only. By that mean, when users select a
customization, it might implicitly change the profile for users in the
selected customization is not accessible by the current profile. The
purpose is to reduce the churn users might be lost what profile has
access to what customization.


## user story

1. click "select customization" button from the menu
-> should show "all" customizations across profiles

2. select a customization under different profile
-> should change the profile to the one owning the newly selected
customization

3. select a profile which doesn't have access to the selected
customization
-> should fallback to "default" and prompt ui saying you don't have
access to the customization




### Implicity change profile when user selects a customization under a
different profile


https://github.com/user-attachments/assets/49bfe61f-04a7-4d07-aaff-1e3c284fb710


### Change profile should validate if the selected customization is
under the new profile or not




https://github.com/user-attachments/assets/414f85dd-50a1-4d28-9b33-e59691f25a0c







Note that customization will have only 1 profile owner, so there wont be
duplicate customization across profiles

---

- 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.
Due to throttling issue we already encounter now in PROD, we decided to
revert it back and fix the throttling issue first then bring this back
afterward.

This reverts commit 70ba83f.

## 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.
…enu (#7137)

## Problem:

Inline suggestion users who upgraded to the new extension version with
region profile selection need to select a profile, but are not prompted
in a significant way to do so.

If they didn't select a profile, inline suggestions would just stop
working for them. There is no obvious hint to the user that to get
inline suggestions working again they must select a profile.

## Solution:

If a profile is not selected, show the status bar as not connected. Once
the status bar is clicked they will see the top item telling them they
must select a profile to get features working. This opens a quick pick
of the profiles they can select from.

<img width="1512" alt="Screenshot 2025-04-22 at 3 29 54 PM"
src="https://github.com/user-attachments/assets/67524b54-ab1b-4f43-80ee-ba1718ce80c8"
/>



https://github.com/user-attachments/assets/7115ed56-8faf-486f-beaa-6f09cbca56e7


---

- 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>
aws-toolkit-automation and others added 7 commits April 22, 2025 22:10
## Problem:

If a user has not selected Q Developer Profile after signing in, their
features will not work.

Some existing users, before the introduction of Q Developer Profiles,
who were already signed in had their features stop working because they
didn't select a profile.

## Solution:

On startup if we detect the user did not select a profile, then send a
warning message that their features will not work until they select one.
The message will have a button to allow them to select a profile through
quickpick, or entirly ignore the message and not show it again.

<img width="753" alt="Screenshot 2025-04-24 at 5 42 51 PM"
src="https://github.com/user-attachments/assets/2429badf-8131-48f8-9ba9-ea81423c9c60"
/>



---

- 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
If we want to log a large json object with giant strings (think whole
files), it can make the logs difficult to read. This is especially
relevant when the underlying string values are not very important.

## Solution
- allow the string values to be truncated with `maxStringLength` option.

## Notes
I am planning to port this utility to Flare to improve the logging
experience there, and want this functionality to exist there however I
thought this could be useful here too.

---

- 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.
…hey have 2+ vscode instances open (#7151)

## Problem
revision of #7134, this pr aims to address the comment from the previous
PR
#7134 (comment)
to extract the logic to a shared module so the diff against 7134 is
expected to be large.


after deployment 4/21, service has a strict 1 tps throttling policy and
there was no caching for the API call previously.
It will impact users as long as they have multiple ide instances opened
as all of them will make list profile call while users attempt to sign
in.

## Solution
1. cache the api result for 60 seconds for reuse 
2. use lock to prevent multiple instances trying to call at the same
time. Only 1 will make the service call and the rest will wait until
it's done and read from the 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.
## Problem
commit 97a4482
breaks the cache by resetting the flag/lock on connection changed. When users sign in and have multiple VSCode instances, all windows will get a `onConnectionChanged` hence overwrite the lock/flag and load the resource from live.

## Solution
Only clear the cache when users sign out, and it's sufficient for "change connection" use case as well. (users have to sign out before connecting with different connection)
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.

10 participants