Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "Imrpoved LLm code review for file review."
}
8 changes: 2 additions & 6 deletions packages/core/src/codewhisperer/util/zipUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,8 @@ export class ZipUtil {
zip.addFile(zipEntryPath, Buffer.from(content, 'utf-8'))

if (scope === CodeWhispererConstants.CodeAnalysisScope.FILE_ON_DEMAND) {
await this.processCombinedGitDiff(
zip,
[workspaceFolder.uri.fsPath],
uri.fsPath,
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.

}
} else {
zip.addFile(uri.fsPath, Buffer.from(content, 'utf-8'))
Expand Down
Loading