Skip to content

Conversation

@leigaol
Copy link
Contributor

@leigaol leigaol commented Apr 22, 2025

Problem

When user accepts suggestion from inline completion or chat, there can be a change in the current open editor's IDE diagnostics, this can be used as a measure for code suggestion quality. Ref: aws/aws-toolkit-jetbrains#5613

This change is part of the server side workspace context.

To reduce the risk of large blast radius, this change is only applied for users who are in the experiment of server side project context (both treatment and control), which is the Amzn idc users.

E2E verifying request id: 97a3c4d4-0c78-4329-93ae-379d2ec66646.

Solution

  1. Add changed IDE diagnostics after user acceptance

  • 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.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@leigaol leigaol marked this pull request as ready for review April 24, 2025 20:46
})

it('insert code when left hand size has non empty character', async () => {
it('insert code when left hand size has non empty character 2', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is not a typo. this is to make the test description different than another one.

Copy link
Contributor

Choose a reason for hiding this comment

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

the tests names are already different?
insert code when left hand size has non empty character
and
insert code when left hand size has no non empty character

const diagnosticDiff = getDiagnosticsDifferences(
session.diagnosticsBeforeAccept,
getDiagnosticsOfCurrentFile()
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious if the sleep here could pollute the data. For users who accept and continue to edit, resulting in diagnostics of WIP code.
Service side has the final say, but an alternate could be aborting with onDidChangeTextDocument event.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a requirement from server side. They know this metrics can be noisy because we rely on the 3rd party plugins for reporting these problems.

rli pushed a commit to aws/aws-toolkit-jetbrains that referenced this pull request May 6, 2025
…#5613)

When user accepts suggestion from inline completion or chat, there can be a change in the current open editor's IDE diagnostics, this can be used as a measure for code suggestion quality. Ref aws/aws-toolkit-vscode#7130.

This change is part of the server side workspace context.

To reduce the risk of large blast radius, this change is only applied for users who are in the experiment of server side project context (both treatment and control), which is the Amzn idc users. 

Verified backend request id 6faef702-938e-42eb-894a-957d9757186e
@Hweinstock Hweinstock merged commit fdaaae1 into aws:master May 6, 2025
45 of 46 checks passed
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.

4 participants