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
@@ -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
Loading