Skip to content

Commit bf9c855

Browse files
committed
fix(amazonq): Prevent adding same file twice for /doc and /dev
1 parent 3f45c37 commit bf9c855

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Stuck on `Uploading code...` for /dev and /doc in some multi-root workspaces"
4+
}

packages/core/src/amazonq/util/files.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,14 @@ export async function prepareRepoData(
4848

4949
let totalBytes = 0
5050
const ignoredExtensionMap = new Map<string, number>()
51+
const addedFilePaths = new Set()
5152

5253
for (const file of files) {
54+
if (addedFilePaths.has(file.zipFilePath)) {
55+
continue
56+
}
57+
addedFilePaths.add(file.zipFilePath)
58+
5359
let fileSize
5460
try {
5561
fileSize = (await fs.stat(file.fileUri)).size

0 commit comments

Comments
 (0)