Skip to content

Commit 9c25c83

Browse files
authored
fix(codewhisperer): crossfile context is always empty #3659
Problem: crossfile context is always empty. Solution: Fix the lambda syntax.
1 parent 4c9713b commit 9c25c83

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "CodeWhisperer: Bug resulting failure of enhanced file context fetching"
4+
}

src/codewhisperer/util/supplementalContext/crossFileContextUtil.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ export async function fetchSupplementalContextForSrc(
7474
}
7575

7676
// DO NOT send code chunk with empty content
77-
return supplementalContexts.filter(item => {
78-
item.content.trim().length !== 0
79-
})
77+
return supplementalContexts.filter(item => item.content.trim().length !== 0)
8078
}
8179

8280
function findBestKChunkMatches(chunkInput: Chunk, chunkReferences: Chunk[], k: number): Chunk[] {

0 commit comments

Comments
 (0)