Skip to content

Commit

Permalink
Merge master into feature/emr
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-toolkit-automation authored Mar 10, 2025
2 parents 2f62d17 + 0dd14a1 commit 895de3f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1104,12 +1104,14 @@ export class ChatController {
const relativePathsOfMergedRelevantDocuments = triggerPayload.documentReferences.map(
(doc) => doc.relativeFilePath
)
const seen: string[] = []
for (const relativePath of relativePathsOfContextCommandFiles) {
if (!relativePathsOfMergedRelevantDocuments.includes(relativePath)) {
if (!relativePathsOfMergedRelevantDocuments.includes(relativePath) && !seen.includes(relativePath)) {
triggerPayload.documentReferences.push({
relativeFilePath: relativePath,
lineRanges: [{ first: -1, second: -1 }],
})
seen.push(relativePath)
}
}
if (triggerPayload.documentReferences) {
Expand Down

0 comments on commit 895de3f

Please sign in to comment.