Skip to content

Commit d00704a

Browse files
committed
use pathUtils normalize
1 parent e9531b6 commit d00704a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { FeatureUseCase } from '../models/constants'
2424
import { ChildProcess, ChildProcessOptions } from '../../shared/utilities/processUtils'
2525
import { ProjectZipError } from '../../amazonqTest/error'
2626
import { removeAnsi } from '../../shared/utilities/textUtilities'
27+
import { normalize } from '../../shared/utilities/pathUtils'
2728

2829
export interface ZipMetadata {
2930
rootDir: string
@@ -122,7 +123,7 @@ export class ZipUtil {
122123
zip.addFile(zipEntryPath, Buffer.from(content, 'utf-8'))
123124

124125
if (scope === CodeWhispererConstants.CodeAnalysisScope.FILE_ON_DEMAND) {
125-
const gitDiffContent = `+++ b/${path.normalize(zipEntryPath).replaceAll(path.win32.sep, path.posix.sep)}` // Sending file path in payload for LLM code review
126+
const gitDiffContent = `+++ b/${normalize(zipEntryPath)}` // Sending file path in payload for LLM code review
126127
zip.addFile(ZipConstants.codeDiffFilePath, Buffer.from(gitDiffContent, 'utf-8'))
127128
}
128129
} else {

0 commit comments

Comments
 (0)