File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/core/src/codewhispererChat/controllers/chat Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments