Skip to content

Commit

Permalink
Merge main into feature/q-mega
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-toolkit-automation authored Nov 26, 2024
2 parents 9e7fa03 + cc476dd commit a4a02d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "Amazon Q /dev: Fix error when accepting changes if leading slash is present."
}
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ private suspend fun CodeGenerationState.generateCode(
fun registerNewFiles(newFileContents: Map<String, String>): List<NewFileZipInfo> =
newFileContents.map {
NewFileZipInfo(
zipFilePath = it.key,
// Note: When managing file state, we normalize file paths returned from the agent in order to ensure they are handled as relative paths.
zipFilePath = it.key.removePrefix("/"),
fileContent = it.value,
rejected = false,
changeApplied = false
Expand All @@ -268,7 +269,8 @@ fun registerNewFiles(newFileContents: Map<String, String>): List<NewFileZipInfo>
fun registerDeletedFiles(deletedFiles: List<String>): List<DeletedFileInfo> =
deletedFiles.map {
DeletedFileInfo(
zipFilePath = it,
// Note: When managing file state, we normalize file paths returned from the agent in order to ensure they are handled as relative paths.
zipFilePath = it.removePrefix("/"),
rejected = false,
changeApplied = false
)
Expand Down

0 comments on commit a4a02d4

Please sign in to comment.