Skip to content

Commit cfd0e87

Browse files
committed
address comments
1 parent 809b409 commit cfd0e87

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"type": "Bug Fix",
3-
"description": "Fix error thrown if plugins send out supplementalContext with the length greather than 10240 characters"
3+
"description": "Inline Suggestions: Occasional `ValidationException` if user context has too many characters."
44
}

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

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

139-
if (totalLength > crossFileContextConfig.maximumTotalLength) {
140-
break
141-
}
142-
143139
supplementalContexts.push({
144140
filePath: chunk.fileName,
145141
content: chunk.nextContent,
146142
score: chunk.score,
147143
})
148144
totalLength += chunk.nextContent.length
145+
146+
if (totalLength > crossFileContextConfig.maximumTotalLength) {
147+
break
148+
}
149149
}
150150

151151
// DO NOT send code chunk with empty content

0 commit comments

Comments
 (0)