Skip to content

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 April 14, 2025 11:25
## 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
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
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.
## Problem
- developer profiles are only synced to our local agents (/dev, /doc,
etc). Now that the main chat panel is served by flare we need to update
the profile information when it becomes available so that flare is using
the correct profile for the request

## Solution
- send profile information to flare on the initial request + subsequent
changes to the active profile
- refresh the webview if the profile changes 

---

- 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
when the flare chat panel refreshes on log in/log out, the message
listener never gets disposed of, causing the next webview instantiation
to have two message listeners that are forwarding messages to the ui

## Solution
dispose of the message listener when the webview gets disposed

---

- 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.
LiGaCu and others added 17 commits May 8, 2025 11:41
…7252

## Problem
AmazonQ LSP needs an identifier for the IDE workspace, which should be
stable and unique for each workspace, regardless of IDE restarts or
system reboots.

## Solution
Use [ExtensionContext.storageUri](https://code.visualstudio.com/api/references/vscode-api#ExtensionContext.storageUri)
as such an identifier and pass it when initializing AmazonQ lsp.
## Problem
We introduced `editorState` in data instrumentation launch. The service
has a requirement of 40k character limit for the `text` field.

## Solution
Implement a check on text length. If the text length exceeds 40k
characters, section 20k max characters from the left and right side of
current cursor position, so the final text is always less than 40k.

validated prod endpoint inline working for files > 40k characters.
Example request id: `57bbbe65-fbe7-47fc-81c4-c65262f47ce8`

---

- 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
There are no unit tests for the new AuthUtil on Flare LSP

## Solution
* Add unit test for core AuthUtil functionality
* Create a test util for all tests where AuthUtil is needed
* Ensure all tests that interact with the AuthUtil consume the new test
util
* Add destroy method to the AuthUtil class to simplify cleanup for unit
tests

---

- 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.
…lableCustomization (#7242) (#7266)

This reverts commit 98b0d5d.

## Problem
It regress #7181 and make 7181 not working: profile will be changed, but
customization will be swapped to default always.


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

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.
fix(amazonq): merge master into feature/amazonqLSP-auth
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 <[email protected]>
@github-actions
Copy link

github-actions bot commented May 9, 2025

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

akhamis-amzn and others added 9 commits May 9, 2025 15:52
## 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 <[email protected]>
@nkomonen-amazon nkomonen-amazon merged commit 4e1d059 into feature/amazonqLSP-auth May 14, 2025
14 of 22 checks passed
@nkomonen-amazon nkomonen-amazon deleted the autoMerge/feature/amazonqLSP-auth branch May 14, 2025 01:52
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.