Skip to content

Conversation

@ashishrp-aws
Copy link
Contributor

@ashishrp-aws ashishrp-aws commented Dec 5, 2024

Problem

  • Code diff for file review format has changed in payload to improve LLM based code review accuracy and is dependent on git.

Solution

  • We are currently send entire file in diff format and run git commands to extract it. This change will remove git dependency for LLM based code review issues.

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

@ashishrp-aws ashishrp-aws requested a review from a team as a code owner December 5, 2024 22:16
@github-actions
Copy link

github-actions bot commented Dec 5, 2024

  • 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.
  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@justinmk3
Copy link
Contributor

Changelog is not needed as it is not customer facing bug/issue.

Then it's not a "fix". But based on your description, I can imagine a way to describe the improvement to customers, something like: "Improved performance of LLM based code review".

Whenever there's any kind of improvement, it's worth mentioning. And conversely, if something is not being improved then it's not a "fix" or a "feat".

CodeWhispererConstants.CodeAnalysisScope.FILE_ON_DEMAND
)
const gitDiffContent = `+++ b/${zipEntryPath}`
zip.addFile(ZipConstants.codeDiffFilePath, Buffer.from(gitDiffContent, 'utf-8'))
Copy link
Contributor

Choose a reason for hiding this comment

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

is this covered by some sort of test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently, code diff format is not covered by tests. I have to add tests for both project and file review. Will add them in followups.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a comment explaining why we are doing this? It's hard to understand just by reading the code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added comment and corrected this for windows as well.

@ashishrp-aws ashishrp-aws requested a review from a team as a code owner December 5, 2024 22:29
@ashishrp-aws ashishrp-aws changed the title fix(amazonq): Fix for Code diff format for file review fix(amazonq): Imrpoved LLm code review for file review Dec 5, 2024
@ctlai95 ctlai95 changed the title fix(amazonq): Imrpoved LLm code review for file review fix(amazonq): Improved LLM code review for file review Dec 5, 2024
@justinmk3 justinmk3 disabled auto-merge December 7, 2024 01:02
@justinmk3 justinmk3 merged commit 9f5bfe4 into aws:master Dec 7, 2024
22 of 24 checks passed
@ashishrp-aws ashishrp-aws deleted the riv branch January 8, 2025 18:21
karanA-aws pushed a commit to karanA-aws/aws-toolkit-vscode that referenced this pull request Jan 17, 2025
## Problem
- Code diff for file review format has changed in payload to improve LLM
based code review accuracy and is dependent on git.

## Solution
- We are currently send entire file in diff format and run git commands
to extract it. This change will remove git dependency for LLM based code
review issues.
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.

3 participants