Skip to content

Commit 3c47315

Browse files
Merge master into feature/sdkv3
2 parents f45c328 + 0dd14a1 commit 3c47315

File tree

1 file changed

+3
-1
lines changed
  • packages/core/src/codewhispererChat/controllers/chat

1 file changed

+3
-1
lines changed

packages/core/src/codewhispererChat/controllers/chat/controller.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,12 +1104,14 @@ export class ChatController {
11041104
const relativePathsOfMergedRelevantDocuments = triggerPayload.documentReferences.map(
11051105
(doc) => doc.relativeFilePath
11061106
)
1107+
const seen: string[] = []
11071108
for (const relativePath of relativePathsOfContextCommandFiles) {
1108-
if (!relativePathsOfMergedRelevantDocuments.includes(relativePath)) {
1109+
if (!relativePathsOfMergedRelevantDocuments.includes(relativePath) && !seen.includes(relativePath)) {
11091110
triggerPayload.documentReferences.push({
11101111
relativeFilePath: relativePath,
11111112
lineRanges: [{ first: -1, second: -1 }],
11121113
})
1114+
seen.push(relativePath)
11131115
}
11141116
}
11151117
if (triggerPayload.documentReferences) {

0 commit comments

Comments
 (0)