Skip to content

Commit 15ba9f8

Browse files
committed
patch
1 parent cfd0e87 commit 15ba9f8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/core/src/codewhisperer/util/supplementalContext/crossFileContextUtil.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,17 @@ export async function fetchSupplementalContextForSrcV1(
136136
for (const chunk of bestChunks) {
137137
throwIfCancelled(cancellationToken)
138138

139-
supplementalContexts.push({
140-
filePath: chunk.fileName,
141-
content: chunk.nextContent,
142-
score: chunk.score,
143-
})
144139
totalLength += chunk.nextContent.length
145140

146141
if (totalLength > crossFileContextConfig.maximumTotalLength) {
147142
break
148143
}
144+
145+
supplementalContexts.push({
146+
filePath: chunk.fileName,
147+
content: chunk.nextContent,
148+
score: chunk.score,
149+
})
149150
}
150151

151152
// DO NOT send code chunk with empty content

0 commit comments

Comments
 (0)