Skip to content

Commit 98098f3

Browse files
committed
Fix for Code diff format for file review
1 parent 2b49a5d commit 98098f3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/core/src/codewhisperer/util/zipUtil.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,8 @@ export class ZipUtil {
120120
zip.addFile(zipEntryPath, Buffer.from(content, 'utf-8'))
121121

122122
if (scope === CodeWhispererConstants.CodeAnalysisScope.FILE_ON_DEMAND) {
123-
await this.processCombinedGitDiff(
124-
zip,
125-
[workspaceFolder.uri.fsPath],
126-
uri.fsPath,
127-
CodeWhispererConstants.CodeAnalysisScope.FILE_ON_DEMAND
128-
)
123+
const gitDiffContent = `+++ b/${zipEntryPath}`
124+
zip.addFile(ZipConstants.codeDiffFilePath, Buffer.from(gitDiffContent, 'utf-8'))
129125
}
130126
} else {
131127
zip.addFile(uri.fsPath, Buffer.from(content, 'utf-8'))

0 commit comments

Comments
 (0)