File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
packages/core/src/codewhisperer/util Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -449,17 +449,20 @@ export class ZipUtil {
449449 }
450450
451451 if ( ZipConstants . knownBinaryFileExts . includes ( fileExtension ) ) {
452+ if ( useCase === FeatureUseCase . TEST_GENERATION ) {
453+ continue
454+ }
455+
452456 zip . writeFile ( file . fileUri . fsPath , path . dirname ( zipEntryPath ) )
453457 } else {
454458 // TODO: verify if this is needed
455- // const isFileOpenAndDirty = this.isFileOpenAndDirty(file.fileUri)
456- // const fileContent = isFileOpenAndDirty ? await this.getTextContent(file.fileUri) : file.fileContent
457- // const fileSize = Buffer.from(fileContent).length
459+ const isFileOpenAndDirty = this . isFileOpenAndDirty ( file . fileUri )
460+ const fileContent = isFileOpenAndDirty ? await this . getTextContent ( file . fileUri ) : file . fileContent
458461
459- this . _totalLines += file . fileContent . split ( ZipConstants . newlineRegex ) . length
462+ this . _totalLines += fileContent . split ( ZipConstants . newlineRegex ) . length
460463
461464 this . incrementCountForLanguage ( file . fileUri , languageCount )
462- zip . writeString ( file . fileContent , zipEntryPath )
465+ zip . writeString ( fileContent , zipEntryPath )
463466 }
464467
465468 this . _pickedSourceFiles . add ( file . fileUri . fsPath )
You can’t perform that action at this time.
0 commit comments