Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Expand Up @@ -743,7 +743,7 @@ export async function pollTransformationJob(jobId: string, validStates: string[]
}
await sleep(CodeWhispererConstants.transformationJobPollingIntervalSeconds * 1000)
} catch (e: any) {
getLogger().error(`CodeTransformation: GetTransformation error = %O`, e)
getLogger().error(`CodeTransformation: error = %O`, e)
throw e
}
}
Expand Down Expand Up @@ -827,11 +827,11 @@ async function processClientInstructions(jobId: string, clientInstructionsPath:
getLogger().info(`CodeTransformation: copied project to ${destinationPath}`)
const diffContents = await fs.readFileText(clientInstructionsPath)
if (diffContents.trim()) {
const diffModel = new DiffModel()
diffModel.parseDiff(clientInstructionsPath, path.join(destinationPath, 'sources'), true)
// show user the diff.patch
const doc = await vscode.workspace.openTextDocument(clientInstructionsPath)
await vscode.window.showTextDocument(doc, { viewColumn: vscode.ViewColumn.One })
const diffModel = new DiffModel()
diffModel.parseDiff(clientInstructionsPath, path.join(destinationPath, 'sources'), true)
} else {
// still need to set the project copy so that we can use it below
transformByQState.setProjectCopyFilePath(path.join(destinationPath, 'sources'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ export class DiffModel {
throw new Error(CodeWhispererConstants.noChangesMadeMessage)
}

getLogger().info(`CodeTransformation: parsing patch file at ${pathToDiff}`)

let changedFiles = parsePatch(diffContents)
// exclude dependency_upgrade.yml from patch application
changedFiles = changedFiles.filter((file) => !file.oldFileName?.includes('dependency_upgrade'))
Expand Down
Loading