Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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": "Bug Fix",
"description": "Stuck on `Uploading code...` for /dev and /doc in some multi-root workspaces"
}
6 changes: 6 additions & 0 deletions packages/core/src/amazonq/util/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,14 @@ export async function prepareRepoData(

let totalBytes = 0
const ignoredExtensionMap = new Map<string, number>()
const addedFilePaths = new Set()

for (const file of files) {
if (addedFilePaths.has(file.zipFilePath)) {
Copy link
Contributor

@vikshe vikshe Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does collectFiles returns same file path if sourcePaths/repoRootPaths > 1 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have a file that shows up in a multi root workspace more than once, then collectFiles will output it multiple times, all with the same zipFilePath

continue
}
addedFilePaths.add(file.zipFilePath)

let fileSize
try {
fileSize = (await fs.stat(file.fileUri)).size
Expand Down
Loading