Skip to content

Commit 8d8ff4a

Browse files
authored
Merge branch 'feature/inline-rollback' into inline-rollback
2 parents 860ef46 + d973fb7 commit 8d8ff4a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/core/src/codewhisperer/service/transformByQ/transformApiHandler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ export async function pollTransformationJob(jobId: string, validStates: string[]
743743
}
744744
await sleep(CodeWhispererConstants.transformationJobPollingIntervalSeconds * 1000)
745745
} catch (e: any) {
746-
getLogger().error(`CodeTransformation: GetTransformation error = %O`, e)
746+
getLogger().error(`CodeTransformation: error = %O`, e)
747747
throw e
748748
}
749749
}
@@ -827,11 +827,11 @@ async function processClientInstructions(jobId: string, clientInstructionsPath:
827827
getLogger().info(`CodeTransformation: copied project to ${destinationPath}`)
828828
const diffContents = await fs.readFileText(clientInstructionsPath)
829829
if (diffContents.trim()) {
830-
const diffModel = new DiffModel()
831-
diffModel.parseDiff(clientInstructionsPath, path.join(destinationPath, 'sources'), true)
832830
// show user the diff.patch
833831
const doc = await vscode.workspace.openTextDocument(clientInstructionsPath)
834832
await vscode.window.showTextDocument(doc, { viewColumn: vscode.ViewColumn.One })
833+
const diffModel = new DiffModel()
834+
diffModel.parseDiff(clientInstructionsPath, path.join(destinationPath, 'sources'), true)
835835
} else {
836836
// still need to set the project copy so that we can use it below
837837
transformByQState.setProjectCopyFilePath(path.join(destinationPath, 'sources'))

packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ export class DiffModel {
166166
throw new Error(CodeWhispererConstants.noChangesMadeMessage)
167167
}
168168

169+
getLogger().info(`CodeTransformation: parsing patch file at ${pathToDiff}`)
170+
169171
let changedFiles = parsePatch(diffContents)
170172
// exclude dependency_upgrade.yml from patch application
171173
changedFiles = changedFiles.filter((file) => !file.oldFileName?.includes('dependency_upgrade'))

0 commit comments

Comments
 (0)